public MemBuffersForBytes withStreamyDecorator(MemBufferDecorator<StreamyBytesMemBuffer> streamyDecorator) { return new MemBuffersForBytes(_segmentAllocator, _chunkyDecorator, streamyDecorator); }
public MemBuffersForBytes withChunkyDecorator(MemBufferDecorator<ChunkyBytesMemBuffer> chunkyDecorator) { return new MemBuffersForBytes(_segmentAllocator, chunkyDecorator, _streamyDecorator); }
public MemBuffersForBytes withStreamyDecorator(MemBufferDecorator<StreamyBytesMemBuffer> streamyDecorator) { return new MemBuffersForBytes(_segmentAllocator, _chunkyDecorator, streamyDecorator); }
public MemBuffersForBytes withAllocator(SegmentAllocator<BytesSegment> allocator) { return new MemBuffersForBytes(allocator, _chunkyDecorator, _streamyDecorator); }
public MemBuffersForBytes withAllocator(SegmentAllocator<BytesSegment> allocator) { return new MemBuffersForBytes(allocator, _chunkyDecorator, _streamyDecorator); }
public MemBuffersForBytes withChunkyDecorator(MemBufferDecorator<ChunkyBytesMemBuffer> chunkyDecorator) { return new MemBuffersForBytes(_segmentAllocator, chunkyDecorator, _streamyDecorator); }
public FileBackedBuffer(final String basePath, final String prefix, final boolean deleteFilesOnClose, final int segmentsSize, final int maxNbSegments) throws IOException { this.basePath = basePath; this.prefix = prefix; this.deleteFilesOnClose = deleteFilesOnClose; smileObjectMapper = new ObjectMapper(smileFactory); smileObjectMapper.registerModule(new JodaModule()); smileObjectMapper.enable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); final MemBuffersForBytes bufs = new MemBuffersForBytes(segmentsSize, 1, maxNbSegments); inputBuffer = bufs.createStreamyBuffer(1, maxNbSegments); recycle(); }
_maxSegmentsPerBuffer = Math.max(2, maxPerBuffer); _offHeapBuffers = new MemBuffersForBytes(OFF_HEAP_BUFFER_SEGMENT_LEN, totalSegments/4, totalSegments);