Package com.fasterxml.util.membuf

Examples of com.fasterxml.util.membuf.StreamyBytesMemBuffer


            final long offset, final long dataLength,
            final StreamyBytesMemBuffer offHeap)
        throws IOException
    {
        final long fsWaitStart = (_diagnostics == null) ? 0L : _timeMaster.nanosForDiagnostics();
        final StreamyBytesMemBuffer fullBuffer = _throttler.performFileRead(StoreOperationSource.REQUEST,
                _operationTime, _entry.getRaw(), _file,
                new FileOperationCallback<StreamyBytesMemBuffer>() {
            @Override
            public StreamyBytesMemBuffer perform(long operationTime, StorableKey key, Storable value, File externalFile)
                throws IOException
View Full Code Here


    protected void _readAllWriteStreamingCompressedLZF(final InputStream in, final OutputStream out,
            final byte[] copyBuffer, final StreamyBytesMemBuffer offHeap)
        throws IOException
    {
        final long waitStart = (_diagnostics == null) ? 0L : _timeMaster.nanosForDiagnostics();
        StreamyBytesMemBuffer fullBuffer =_throttler.performFileRead(StoreOperationSource.REQUEST,
                _operationTime, _entry.getRaw(), _file,
                new FileOperationCallback<StreamyBytesMemBuffer>() {
            @SuppressWarnings("resource")
            @Override
            public StreamyBytesMemBuffer perform(long operationTime, StorableKey key, Storable value, File externalFile)
View Full Code Here

    }

    @Override
    public <T> T leaseOffHeapBuffer(ByteBufferCallback<T> cb)
    {
        StreamyBytesMemBuffer buffer = null;
        try {
            buffer = allocOffHeapBuffer();
            return cb.withBuffer(buffer);
        } catch (IllegalStateException e) {
            return cb.withError(e);
        } finally {
            if (buffer != null) {
                buffer.close();
            }
        }
    }
View Full Code Here

                stdMetadata.compression = Compression.LZF;
            }
        }

        // First things first: safe handling of off-heap buffer...
        StreamyBytesMemBuffer offHeap = allocOffHeapBuffer();
        try {
            return _putLargeEntry2(source, diag,
                    key, stdMetadata, customMetadata,
                    allowOverwrites, readBuffer, readByteCount, input,
                    skipCompression,
                    offHeap);
        } finally {
            if (offHeap != null) {
                offHeap.close();
            }
        }
    }
View Full Code Here

            final long offset, final long dataLength,
            final StreamyBytesMemBuffer offHeap)
        throws IOException
    {
        final long fsWaitStart = (_diagnostics == null) ? 0L : _timeMaster.nanosForDiagnostics();
        final StreamyBytesMemBuffer fullBuffer = _throttler.performFileRead(StoreOperationSource.REQUEST,
                _operationTime, _entry.getRaw(), _file,
                new FileOperationCallback<StreamyBytesMemBuffer>() {
            @Override
            public StreamyBytesMemBuffer perform(long operationTime, StorableKey key, Storable value, File externalFile)
                throws IOException
View Full Code Here

    protected void _readAllWriteStreamingCompressedLZF(final InputStream in, final OutputStream out,
            final byte[] copyBuffer, final StreamyBytesMemBuffer offHeap)
        throws IOException
    {
        final long waitStart = (_diagnostics == null) ? 0L : _timeMaster.nanosForDiagnostics();
        StreamyBytesMemBuffer fullBuffer =_throttler.performFileRead(StoreOperationSource.REQUEST,
                _operationTime, _entry.getRaw(), _file,
                new FileOperationCallback<StreamyBytesMemBuffer>() {
            @SuppressWarnings("resource")
            @Override
            public StreamyBytesMemBuffer perform(long operationTime, StorableKey key, Storable value, File externalFile)
View Full Code Here

TOP

Related Classes of com.fasterxml.util.membuf.StreamyBytesMemBuffer

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.