Package org.voltdb.utils

Examples of org.voltdb.utils.DeferredSerialization


        synchronized (this) {
            if (m_isShutdown) {
                return false;
            }
            updateLastPendingWriteTimeAndQueueBackpressure();
            m_queuedWrites.offer(new DeferredSerialization() {
                @Override
                public BBContainer serialize(final DBBPool pool) throws IOException {
                    final FastSerializer fs = new FastSerializer(pool, m_port.m_expectedOutgoingMessageSize);
                    return fs.writeObjectForMessaging(f);
                }
View Full Code Here


        synchronized (this) {
            if (m_isShutdown) {
                return false;
            }
            updateLastPendingWriteTimeAndQueueBackpressure();
            m_queuedWrites.offer(new DeferredSerialization() {
                @Override
                public BBContainer serialize(final DBBPool pool) throws IOException {
                    final FastSerializer fs = new FastSerializer(pool, expectedSize);
                    return fs.writeObjectForMessaging(f);
                }
View Full Code Here

             * Attempt to use one of our own pooled direct byte buffers
             * so that a gathering write can be done later. Java gathering
             * writes spam direct byte buffers if many regular BBs are used
             */
            if (b.remaining() < DBBPool.MAX_ALLOCATION_SIZE){
                m_queuedWrites.offer(new DeferredSerialization() {
                    @Override
                    public BBContainer serialize(final DBBPool pool) {
                        final BBContainer c = pool.acquire(b.remaining());
                        assert(c.b.isDirect());
                        c.b.put(b);
View Full Code Here

                }
            }
        }
        final BBContainer results[] = new BBContainer[oldlist.size()];
        int ii = 0;
        DeferredSerialization ds = null;
        int bytesQueued = 0;
        while ((ds = oldlist.poll()) != null) {
            results[ii] = ds.serialize(pool);
            bytesQueued += results[ii].b.remaining();
            assert(results[ii] != null);
            assert(results[ii].b != null);
            ii++;
        }
View Full Code Here

        while ((c = m_queuedBuffers.poll()) != null) {
            bytesReleased += c.b.remaining();
            c.discard();
        }
        updateQueued(-bytesReleased, false);
        DeferredSerialization ds = null;
        while ((ds = m_queuedWrites.poll()) != null) {
            ds.cancel();
        }
    }
View Full Code Here

TOP

Related Classes of org.voltdb.utils.DeferredSerialization

Copyright © 2018 www.massapicom. 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.