io.netty.util.Recycler Java Examples

The following examples show how to use io.netty.util.Recycler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConsumerImpl.java    From pulsar with Apache License 2.0 4 votes vote down vote up
protected ChunkedMessageCtx newObject(Recycler.Handle<ChunkedMessageCtx> handle) {
    return new ChunkedMessageCtx(handle);
}
 
Example #2
Source File: PooledDirectByteBuf.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
private PooledDirectByteBuf(Recycler.Handle recyclerHandle, int maxCapacity) {
    super(recyclerHandle, maxCapacity);
}
 
Example #3
Source File: AbstractChannelHandlerContext.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
private WriteAndFlushTask(Recycler.Handle handle) {
    super(handle);
}
 
Example #4
Source File: PooledByteBuf.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
protected PooledByteBuf(Recycler.Handle recyclerHandle, int maxCapacity) {
    super(maxCapacity);
    this.recyclerHandle = recyclerHandle;
}
 
Example #5
Source File: PooledByteBuf.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
private void recycle() {
    Recycler.Handle recyclerHandle = this.recyclerHandle;
    if (recyclerHandle != null) {
        ((Recycler<Object>) recycler()).recycle(this, recyclerHandle);
    }
}
 
Example #6
Source File: PooledDirectByteBuf.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
protected Recycler<?> recycler() {
    return RECYCLER;
}
 
Example #7
Source File: PooledUnsafeDirectByteBuf.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
private PooledUnsafeDirectByteBuf(Recycler.Handle recyclerHandle, int maxCapacity) {
    super(recyclerHandle, maxCapacity);
}
 
Example #8
Source File: PooledHeapByteBuf.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
protected Recycler<?> recycler() {
    return RECYCLER;
}
 
Example #9
Source File: PooledHeapByteBuf.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
private PooledHeapByteBuf(Recycler.Handle recyclerHandle, int maxCapacity) {
    super(recyclerHandle, maxCapacity);
}
 
Example #10
Source File: AbstractChannelHandlerContext.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
protected void recycle(Recycler.Handle handle) {
    RECYCLER.recycle(this, handle);
}
 
Example #11
Source File: PooledUnsafeDirectByteBuf.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
protected Recycler<?> recycler() {
    return RECYCLER;
}
 
Example #12
Source File: ByteBufCodedOutputStream.java    From pulsar with Apache License 2.0 4 votes vote down vote up
protected ByteBufCodedOutputStream newObject(Recycler.Handle<ByteBufCodedOutputStream> handle) {
    return new ByteBufCodedOutputStream(handle);
}
 
Example #13
Source File: ByteBufPair.java    From pulsar with Apache License 2.0 4 votes vote down vote up
@Override
protected ByteBufPair newObject(Recycler.Handle<ByteBufPair> handle) {
    return new ByteBufPair(handle);
}
 
Example #14
Source File: TransactionMetaStoreHandler.java    From pulsar with Apache License 2.0 4 votes vote down vote up
private OpForVoidCallBack(Recycler.Handle<OpForVoidCallBack> recyclerHandle) {
    this.recyclerHandle = recyclerHandle;
}
 
Example #15
Source File: TransactionMetaStoreHandler.java    From pulsar with Apache License 2.0 4 votes vote down vote up
private OpForTxnIdCallBack(Recycler.Handle<OpForTxnIdCallBack> recyclerHandle) {
    this.recyclerHandle = recyclerHandle;
}
 
Example #16
Source File: ByteBufCodedInputStream.java    From pulsar with Apache License 2.0 4 votes vote down vote up
protected ByteBufCodedInputStream newObject(Recycler.Handle<ByteBufCodedInputStream> handle) {
    return new ByteBufCodedInputStream(handle);
}
 
Example #17
Source File: ReplicationMetrics.java    From pulsar with Apache License 2.0 4 votes vote down vote up
@Override
protected ReplicationMetrics newObject(Recycler.Handle<ReplicationMetrics> handle) {
    return new ReplicationMetrics(handle);
}
 
Example #18
Source File: Producer.java    From pulsar with Apache License 2.0 4 votes vote down vote up
protected MessagePublishContext newObject(Recycler.Handle<MessagePublishContext> handle) {
    return new MessagePublishContext(handle);
}
 
Example #19
Source File: EntryBatchIndexesAcks.java    From pulsar with Apache License 2.0 4 votes vote down vote up
private EntryBatchIndexesAcks(Recycler.Handle<EntryBatchIndexesAcks> handle) {
    this.handle = handle;
}
 
Example #20
Source File: FileSystemManagedLedgerOffloader.java    From pulsar with Apache License 2.0 4 votes vote down vote up
@Override
protected FileSystemWriter newObject(Recycler.Handle<FileSystemWriter> handle) {
    return new FileSystemWriter(handle);
}
 
Example #21
Source File: FileSystemManagedLedgerOffloader.java    From pulsar with Apache License 2.0 4 votes vote down vote up
private FileSystemWriter(Recycler.Handle<FileSystemWriter> recyclerHandle) {
    this.recyclerHandle = recyclerHandle;
}
 
Example #22
Source File: OffloadIndexBlockImpl.java    From pulsar with Apache License 2.0 4 votes vote down vote up
@Override
protected OffloadIndexBlockImpl newObject(Recycler.Handle<OffloadIndexBlockImpl> handle) {
    return new OffloadIndexBlockImpl(handle);
}
 
Example #23
Source File: DataFrameEncoder.java    From nemo with Apache License 2.0 4 votes vote down vote up
@Override
protected DataFrame newObject(final Recycler.Handle handle) {
  return new DataFrame(handle);
}
 
Example #24
Source File: PendingWrite.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
private PendingWrite(Recycler.Handle handle) {
    this.handle = handle;
}
 
Example #25
Source File: RecycleTest.java    From sailfish with Apache License 2.0 4 votes vote down vote up
@Override
protected Resource2 newObject(Recycler.Handle<Resource2> handle) {
	return new Resource2(handle);
}
 
Example #26
Source File: RecycleTest.java    From sailfish with Apache License 2.0 4 votes vote down vote up
private Resource(Recycler.Handle<Resource> handle) {
	this.handle = handle;
}
 
Example #27
Source File: BytesResponseFuture.java    From sailfish with Apache License 2.0 4 votes vote down vote up
@Override
protected CallbackCheckTask newObject(Recycler.Handle<CallbackCheckTask> handle) {
	return new CallbackCheckTask(handle);
}
 
Example #28
Source File: BytesResponseFuture.java    From sailfish with Apache License 2.0 4 votes vote down vote up
@Override
protected CallbackTask newObject(Recycler.Handle<CallbackTask> handle) {
	return new CallbackTask(handle);
}
 
Example #29
Source File: PendingWriteQueue.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
private PendingWrite(Recycler.Handle<PendingWrite> handle) {
    this.handle = handle;
}
 
Example #30
Source File: ResponseProtocol.java    From sailfish with Apache License 2.0 4 votes vote down vote up
public ResponseProtocol(Recycler.Handle<ResponseProtocol> handle) {
	this.handle = handle;
}