Examples of BlockMetaData


Examples of freenet.store.BlockMetadata

   
    // There are at least 2 threads that call this function.
    // DO NOT reuse the meta object, unless on a per-thread basis.
    // Object allocation is pretty cheap in modern Java anyway...
    // If we do reuse it, call reset().
    BlockMetadata meta = new BlockMetadata();
    KeyBlock block = node.fetch(key, false, false, false, false, meta);
    if(block != null)
      tag.setNotRoutedOnwards();
   
    RejectReason rejectReason = nodeStats.shouldRejectRequest(!isSSK, false, isSSK, false, false, source, block != null, false, realTimeFlag, tag);
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.BlockMetaData

    {
        final ArrayList listenerSet = new ArrayList();
        for( int i = 0; i < components.length; i++ )
        {
            final ComponentProfile component = components[ i ];
            final BlockMetaData block =
                toBlockMetaData( component.getTemplate(),
                                 component.getInfo() );
            listenerSet.add( block );
        }
        return (BlockMetaData[])listenerSet.toArray(
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.BlockMetaData

        final boolean disableProxy = component.isDisableProxy();
        final DependencyMetaData[] dependencies =
            toPhoenixDependencys( component.getDependencies() );

        final BlockInfo blockInfo = ComponentInfoConverter.toBlockInfo( info );
        return new BlockMetaData( component.getName(),
                                  dependencies,
                                  disableProxy,
                                  blockInfo );
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.BlockMetaData

    private void verifyNoCircularDependencies( final BlockMetaData[] blocks )
        throws VerifyException
    {
        for( int i = 0; i < blocks.length; i++ )
        {
            final BlockMetaData block = blocks[ i ];

            final Stack stack = new Stack();
            stack.push( block );
            verifyNoCircularDependencies( block, blocks, stack );
            stack.pop();
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.BlockMetaData

    {
        final BlockMetaData[] dependencies = getDependencies( block, blocks );

        for( int i = 0; i < dependencies.length; i++ )
        {
            final BlockMetaData dependency = dependencies[ i ];
            if( stack.contains( dependency ) )
            {
                final String trace = getDependencyTrace( dependency, stack );
                final String message =
                    REZ.getString( "dependency-circular", block.getName(), trace );
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.BlockMetaData

        final String name = block.getName();
        final int size = stack.size();
        final int top = size - 1;
        for( int i = top; i >= 0; i-- )
        {
            final BlockMetaData other = (BlockMetaData)stack.get( i );
            if( top != i )
            {
                sb.append( ", " );
            }
            sb.append( other.getName() );

            if( other.getName().equals( name ) )
            {
                break;
            }
        }
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.BlockMetaData

        final DependencyMetaData[] deps = block.getDependencies();

        for( int i = 0; i < deps.length; i++ )
        {
            final String name = deps[ i ].getName();
            final BlockMetaData other = getBlock( name, blocks );
            dependencies.add( other );
        }

        return (BlockMetaData[])dependencies.toArray( new BlockMetaData[ 0 ] );
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.BlockMetaData

            final String roleName = roles[ i ].getRole();
            final ServiceDescriptor service =
                info.getDependency( roleName ).getService();

            //Get the other block that is providing service
            final BlockMetaData other = getBlock( blockName, others );
            if( null == other )
            {
                final String message =
                    REZ.getString( "dependency-noblock", blockName, block.getName() );
                throw new VerifyException( message );
            }

            //make sure that the block offers service
            //that user expects it to be providing
            final ServiceDescriptor[] services = other.getBlockInfo().getServices();
            if( !hasMatchingService( service, services ) )
            {
                final String message =
                    REZ.getString( "dependency-noservice", blockName, service, block.getName() );
                throw new VerifyException( message );
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.BlockMetaData

        throws AssemblyException
    {
        final ArrayList blockSet = new ArrayList();
        for( int i = 0; i < blocks.length; i++ )
        {
            final BlockMetaData blockMetaData =
                buildBlock( blocks[ i ], classLoader );
            blockSet.add( blockMetaData );
        }

        return (BlockMetaData[])blockSet.toArray( new BlockMetaData[ 0 ] );
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.BlockMetaData

            final DependencyMetaData[] roles = buildDependencyMetaDatas( provides );
            final BlockInfo info = getBlockInfo( name, classname, classLoader );


            return new BlockMetaData( name, roles, disableProxy, info );
        }
        catch( final ConfigurationException ce )
        {
            final String message =
                REZ.getString( "block-entry-malformed", block.getLocation(), ce.getMessage() );
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.