Package org.voltcore.utils.DBBPool

Examples of org.voltcore.utils.DBBPool.BBContainer.discard()


            // Queue ack to this block
            m_ack.ack(hsId, m_EOF, targetId, blockIndex);

            return restoreWork;
        } finally {
            container.discard();
        }
    }

    public long bytesTransferred() {
        return m_bytesReceived;
View Full Code Here


                }
            }
        }
        final BBContainer cont = DBBPool.wrapBB(buf);
        DBBPool.registerUnsafeMemory(cont.address());
        cont.discard();
    }
}
View Full Code Here

                                    lastSegmentIndex = segmentIndex;
                                }
                                break;
                            }
                        } finally {
                            nextObject.discard();
                        }
                    }

                    //If this is set the just processed segment was the last one
                    if (lastSegmentIndex != null) {
View Full Code Here

                return new BBContainer(origin.b()) {
                    @Override
                    public void discard() {
                        checkDoubleFree();
                        permits.release();
                        origin.discard();
                    }
                };
            }

            @Override
View Full Code Here

                            buf.clear();
                        }
                        inputChannel.close();
                        outputChannel.close();
                    } finally {
                        bufC.discard();
                    }
                } else {
                    throw new IOException(fInOtherSubroot + " already exists");
                }
            }
View Full Code Here

            input = DBBPool.allocateDirect(Math.max(inputCapacity * 2, length));
            changedBuffer = true;
        }

        if (outputCapacity < maxCompressedLength) {
            output.discard();
            output = DBBPool.allocateDirect(Math.max(outputCapacity * 2, maxCompressedLength));
            changedBuffer = true;
        }

        if (changedBuffer) {
View Full Code Here

        inputBuffer.flip();

        final int uncompressedLength = Snappy.uncompressedLength(inputBuffer);
        final int outputCapacity = output.b().capacity();
        if (outputCapacity < uncompressedLength) {
            output.discard();
            output = DBBPool.allocateDirect(Math.max(outputCapacity * 2, uncompressedLength));
            buffers = new IOBuffers(input, output);
            m_buffers.set(buffers);
        }
        final ByteBuffer outputBuffer = output.b();
View Full Code Here

                    lastNumCharacters = p.getFirst();
                    byte csvBytes[] = p.getSecond();
                    m_availableBytes.addAndGet(csvBytes.length);
                    m_available.offer(csvBytes);
                } finally {
                    c.discard();
                }
            }
        }

        @Override
View Full Code Here

                    //What ack from future is known?
                    if (exportLog.isDebugEnabled()) {
                        exportLog.debug("Dropping already acked USO: " + m_lastReleaseOffset
                                + " Buffer info: " + uso + " Size: " + buffer.capacity());
                    }
                    cont.discard();
                    return;
                }
                try {
                    m_committedBuffers.offer(new StreamBlock(
                            new BBContainer(buffer) {
View Full Code Here

                    m_committedBuffers.offer(new StreamBlock(
                            new BBContainer(buffer) {
                                @Override
                                public void discard() {
                                    final ByteBuffer buf = checkDoubleFree();
                                    cont.discard();
                                    deleted.set(true);
                                }
                            }, uso, false));
                } catch (IOException e) {
                    exportLog.error(e);
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.