List of usage examples for io.netty.util Recycler Recycler
protected Recycler()
From source file:org.apache.bookkeeper.api.kv.impl.result.KeyValueFactory.java
License:Apache License
public KeyValueFactory() { this.recordRecycler = new Recycler<KeyValueImpl<K, V>>() { @Override/*from w w w. j a va 2 s . co m*/ protected KeyValueImpl<K, V> newObject(Handle<KeyValueImpl<K, V>> handle) { return new KeyValueImpl<>(handle); } }; }
From source file:org.apache.bookkeeper.api.kv.impl.result.ResultFactory.java
License:Apache License
public ResultFactory() { this.putResultRecycler = new Recycler<PutResultImpl<K, V>>() { @Override//from w w w . j ava 2s. com protected PutResultImpl<K, V> newObject(Handle<PutResultImpl<K, V>> handle) { return new PutResultImpl<>(handle); } }; this.deleteResultRecycler = new Recycler<DeleteResultImpl<K, V>>() { @Override protected DeleteResultImpl<K, V> newObject(Handle<DeleteResultImpl<K, V>> handle) { return new DeleteResultImpl<>(handle); } }; this.rangeResultRecycler = new Recycler<RangeResultImpl<K, V>>() { @Override protected RangeResultImpl<K, V> newObject(Handle<RangeResultImpl<K, V>> handle) { return new RangeResultImpl<>(handle); } }; this.txnResultRecycler = new Recycler<TxnResultImpl<K, V>>() { @Override protected TxnResultImpl<K, V> newObject(Handle<TxnResultImpl<K, V>> handle) { return new TxnResultImpl<>(handle); } }; this.incrementResultRecycler = new Recycler<IncrementResultImpl<K, V>>() { @Override protected IncrementResultImpl<K, V> newObject(Handle<IncrementResultImpl<K, V>> handle) { return new IncrementResultImpl<>(handle); } }; }