Examples of allocate()


Examples of net.sf.saxon.om.NamePool.allocate()

                    }
                    if (uriCode == -1) {
                        return null;
                    }
                    String uri = pool.getURIFromURICode((short)uriCode);
                    int typefp = pool.allocate(parts[0], uri, parts[1]) & NamePool.FP_MASK;
                    return env.getConfiguration().getSchemaType(typefp);
                } catch (QNameException e) {
                    throw new XPathException(e.getMessage());
                }
            }
View Full Code Here

Examples of org.apache.activemq.store.kahadb.disk.page.Transaction.allocate()

    @Override
    protected Index<String, Long> createIndex() throws Exception {

        Transaction tx = pf.tx();
        long id = tx.allocate().getPageId();
        tx.commit();

        HashIndex<String, Long> index = new HashIndex<String, Long>(pf, id);
        index.setKeyMarshaller(StringMarshaller.INSTANCE);
        index.setValueMarshaller(LongMarshaller.INSTANCE);
View Full Code Here

Examples of org.apache.cassandra.utils.memory.AbstractAllocator.allocate()

    /** Allocates 1 byte from a new SlabAllocator and returns it. */
    private AbstractAllocator bumpedSlab()
    {
        AbstractAllocator allocator = POOL.newAllocator(new OpOrder());
        allocator.allocate(1);
        return allocator;
    }

    @Test
    public void testAllocate()
View Full Code Here

Examples of org.apache.catalina.Wrapper.allocate()

        }

        // Allocate a servlet instance to perform this request
        Servlet instance = null;
        try {
            instance = wrapper.allocate();
        } catch (ServletException e) {
            log(sm.getString("invokerServlet.allocate", inRequestURI), e);
            context.removeServletMapping(pattern);
            context.removeChild(wrapper);
            Throwable rootCause = e.getRootCause();
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.allocate()

    FileStatus fileStat = getFileStatus(client, absolute);
    if (fileStat.isDirectory()) {
      disconnect(client);
      throw new FileNotFoundException("Path " + file + " is a directory.");
    }
    client.allocate(bufferSize);
    Path parent = absolute.getParent();
    // Change to parent directory on the
    // server. Only then can we read the
    // file
    // on the server by opening up an InputStream. As a side effect the working
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.allocate()

    if (parent == null || !mkdirs(client, parent, FsPermission.getDirDefault())) {
      parent = (parent == null) ? new Path("/") : parent;
      disconnect(client);
      throw new IOException("create(): Mkdirs failed to create: " + parent);
    }
    client.allocate(bufferSize);
    // Change to parent directory on the server. Only then can we write to the
    // file on the server by opening up an OutputStream. As a side effect the
    // working directory on the server is changed to the parent directory of the
    // file. The FTP client connection is closed when close() is called on the
    // FSDataOutputStream.
View Full Code Here

Examples of org.apache.directmemory.memory.allocator.Allocator.allocate()

                else
                {
                    throw new BufferOverflowException();
                }
            }
            final MemoryBuffer buffer = allocator.allocate( payload.length );

            if ( buffer == null )
            {
                continue;
            }
View Full Code Here

Examples of org.apache.directmemory.memory.allocator.ByteBufferAllocator.allocate()

        long start = System.currentTimeMillis();

        for ( int i = 0; i < howMany; i++ )
        {
            allocator.allocate( size );
        }

        logger.info( "...done in " + ( System.currentTimeMillis() - start ) + " msecs." );
        logger.info( "---------------------------------" );
        dump( allocator );
View Full Code Here

Examples of org.apache.directmemory.memory.allocator.FixedSizeUnsafeAllocator.allocate()

                for ( int o = 0; o < TEST_VALUES_COUNT; o++ )
                {
                    values[o] = (int) ( random.nextDouble() * ( max - min + 1 ) ) + min;
                }

                MemoryBuffer buffer = allocator.allocate( 5 );

                for ( int v = 0; v < TEST_VALUES_COUNT; v++ )
                {
                    int value = values[v];
                    buffer.clear();
View Full Code Here

Examples of org.apache.directmemory.memory.allocator.MergingByteBufferAllocator.allocate()

        long start = System.currentTimeMillis();

        for ( int i = 0; i < howMany; i++ )
        {
            allocator.allocate( size );
        }

        logger.info( "...done in " + ( System.currentTimeMillis() - start ) + " msecs." );
        logger.info( "---------------------------------" );
        dump( allocator );
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.