Examples of ByteBufferPacketPool


Examples of org.activeio.packet.ByteBufferPacketPool

        this(new LogFileManager(logDirectory, logFileCount, logFileSize));
    }

    public JournalImpl(LogFileManager logFile) {
        this.file = logFile;
        this.packetPool = new ByteBufferPacketPool(DEFAULT_POOL_SIZE, DEFAULT_PACKET_SIZE);
        this.executor = new QueuedExecutor();
        this.executor.setThreadFactory(new ThreadFactory() {
            public Thread newThread(Runnable runnable) {
                Thread answer = new Thread(runnable, "Journal Writter");
                answer.setPriority(Thread.MAX_PRIORITY);
View Full Code Here

Examples of org.apache.activeio.packet.ByteBufferPacketPool

     * since the old pools are not being gc'ed fast enough.  So we pool the pool.
     * @return
     */
    synchronized static private ByteBufferPacketPool createBufferPool() {
        if( lastPool !=null ) {
            ByteBufferPacketPool rc = lastPool;
            lastPool = null;
            return rc;
        } else {
            return new ByteBufferPacketPool(DEFAULT_POOL_SIZE, DEFAULT_PACKET_SIZE);
        }
    }
View Full Code Here

Examples of org.apache.activeio.packet.ByteBufferPacketPool

        if (disposed)
            return;
        disposed=true;
        executor.shutdown();
        file.dispose();
        ByteBufferPacketPool pool = packetPool;
        packetPool=null;
        disposeBufferPool(pool);
    }
View Full Code Here

Examples of org.apache.activeio.packet.ByteBufferPacketPool

     * since the old pools are not being gc'ed fast enough.  So we pool the pool.
     * @return
     */
    synchronized static private ByteBufferPacketPool createBufferPool() {
        if( lastPool !=null ) {
            ByteBufferPacketPool rc = lastPool;
            lastPool = null;
            return rc;
        } else {
            return new ByteBufferPacketPool(DEFAULT_POOL_SIZE, DEFAULT_PACKET_SIZE);
        }
    }
View Full Code Here

Examples of org.apache.activeio.packet.ByteBufferPacketPool

        if (disposed)
            return;
        disposed=true;
        executor.shutdown();
        file.dispose();
        ByteBufferPacketPool pool = packetPool;
        packetPool=null;
        disposeBufferPool(pool);
    }
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.