public static final class SimpleString.ByteBufSimpleStringPool extends AbstractByteBufPool<SimpleString>
DEFAULT_POOL_CAPACITY| Constructor and Description |
|---|
ByteBufSimpleStringPool() |
ByteBufSimpleStringPool(int capacity,
int maxCharsLength) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canPool(io.netty.buffer.ByteBuf byteBuf,
int length)
Returns
true if length's byteBuf content from ByteBuf.readerIndex() can be pooled,
false otherwise. |
protected SimpleString |
create(io.netty.buffer.ByteBuf byteBuf,
int length)
Create a new entry.
|
protected boolean |
isEqual(SimpleString entry,
io.netty.buffer.ByteBuf byteBuf,
int offset,
int length)
Returns
true if the entry content is the same of byteBuf at the specified offset
and length false otherwise. |
getOrCreatepublic ByteBufSimpleStringPool()
public ByteBufSimpleStringPool(int capacity,
int maxCharsLength)
protected boolean isEqual(SimpleString entry, io.netty.buffer.ByteBuf byteBuf, int offset, int length)
AbstractByteBufPooltrue if the entry content is the same of byteBuf at the specified offset
and length false otherwise.isEqual in class AbstractByteBufPool<SimpleString>protected boolean canPool(io.netty.buffer.ByteBuf byteBuf,
int length)
AbstractByteBufPooltrue if length's byteBuf content from ByteBuf.readerIndex() can be pooled,
false otherwise.canPool in class AbstractByteBufPool<SimpleString>protected SimpleString create(io.netty.buffer.ByteBuf byteBuf, int length)
AbstractByteBufPoolcreate in class AbstractByteBufPool<SimpleString>Copyright © 2018 The Apache Software Foundation. All Rights Reserved.