Examples of IndexTuple


Examples of cascading.tuple.io.IndexTuple

    if( collections[ 0 ] instanceof FalseCollection ) // force reset on FalseCollection
      ( (FalseCollection) collections[ 0 ] ).reset( null );

    while( values[ 0 ].hasNext() )
      {
      IndexTuple current = (IndexTuple) values[ 0 ].next();
      int pos = current.getIndex();

      // if this is the first (lhs) co-group, just use values iterator
      // we are guaranteed all the remainder tuples in the iterator are from pos == 0
      if( numSelfJoins == 0 && pos == 0 )
        {
        ( (FalseCollection) collections[ 0 ] ).reset( createIterator( current, values[ 0 ] ) );
        break;
        }

      collections[ pos ].add( current.getTuple() ); // get the value tuple for this cogroup
      }
    }
View Full Code Here

Examples of cascading.tuple.io.IndexTuple

  @Override
  protected void wrapGroupingAndCollect( Duct previous, Tuple valuesTuple, Tuple groupKey ) throws java.io.IOException
    {
    Integer ordinal = ordinalMap.get( previous );

    collector.collect( new IndexTuple( ordinal, groupKey ), new IndexTuple( ordinal, valuesTuple ) );
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.IndexTuple

    public Object proceed(final JoinPointBase joinPoint) throws Throwable {
        if (!joinPoint.isInCflow()) {
            return null;
        }
        for (int i = m_adviceIndexes.length - 1; i >= 0; i--) {
            IndexTuple index = m_adviceIndexes[i];
            int aspectIndex = index.getAspectIndex();
            int methodIndex = index.getMethodIndex();
            m_aspectManager.getAspectContainer(aspectIndex).invokeAdvice(methodIndex, joinPoint);
        }
        return null;
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.IndexTuple

                                List advices = crossCuttingInfo.getAspectDefinition().getAllAdvices();
                                for (Iterator it = advices.iterator(); it.hasNext();) {
                                    final AdviceDefinition adviceDef = (AdviceDefinition)it.next();
                                    m_adviceIndexes.put(
                                            adviceDef.getName(),
                                            new IndexTuple(indexAspect, adviceDef.getMethodIndex())
                                    );
                                }

                                // mixins
                                List introductions = crossCuttingInfo.getAspectDefinition().getIntroductions();
View Full Code Here

Examples of org.codehaus.aspectwerkz.IndexTuple

     */
    public IndexTuple getAdviceIndexFor(final String name) {
        if (name == null) {
            throw new IllegalArgumentException("advice name can not be null");
        }
        final IndexTuple index = (IndexTuple)m_adviceIndexes.get(name);
        if (index == null) {
            throw new DefinitionException("advice " + name + " is not properly defined");
        }
        return index;
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.IndexTuple

    public Object proceed(final JoinPointBase joinPoint) throws Throwable {
        if (!joinPoint.isInCflow()) {
            return null;
        }
        for (int i = 0, j = m_adviceIndexes.length; i < j; i++) {
            IndexTuple index = m_adviceIndexes[i];
            int aspectIndex = index.getAspectIndex();
            int methodIndex = index.getMethodIndex();
            m_aspectManager.getAspectContainer(aspectIndex).invokeAdvice(methodIndex, joinPoint);
        }
        return null;
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.IndexTuple

                }
            }
            else {
                m_currentAdviceIndex++;
                try {
                    IndexTuple index = m_adviceIndexes[m_currentAdviceIndex];
                    result = m_aspectManager.getAspectContainer(index.getAspectIndex()).
                            invokeAdvice(index.getMethodIndex(), joinPoint);
                }
                finally {
                    m_currentAdviceIndex--;
                }
            }
View Full Code Here

Examples of org.codehaus.aspectwerkz.IndexTuple

        Advice advice = new PreAdvice() {
            public void execute(final JoinPoint joinPoint) {
            }
        };
        ((XmlDefSystem)SystemLoader.getSystem("tests")).register("testFindAdviceByIndex", advice);
        IndexTuple index = SystemLoader.getSystem("tests").getAdviceIndexFor("testFindAdviceByIndex");
        assertEquals(((XmlDefSystem)SystemLoader.getSystem("tests")).getAdvice("testFindAdviceByIndex"), ((XmlDefSystem)SystemLoader.getSystem("tests")).getAdvice(index));
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.IndexTuple

            try {
                // TODO: handle a list of systems that nees to be matched to the advice lists (loadAdvices etc.)
                if (m_system.isAttribDef()) {
                    AttribDefSystem system = (AttribDefSystem)m_system;

                    IndexTuple index = m_adviceIndexes[m_currentAdviceIndex];
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    result = system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, this);
                }
                else {
                    XmlDefSystem system = (XmlDefSystem)m_system;
View Full Code Here

Examples of org.codehaus.aspectwerkz.IndexTuple

        // TODO: handle a list of systems that nees to be matched to the advice lists (loadAdvices etc.)
        if (m_system.isAttribDef()) {
            AttribDefSystem system = (AttribDefSystem)m_system;
            for (int i = 0, j = m_preAdvices.length; i < j; i++) {
                try {
                    IndexTuple index = m_preAdvices[i];
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.