public static final class SimpleString.ByteBufSimpleStringPool extends AbstractByteBufPool<SimpleString>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_LENGTH |
DEFAULT_POOL_CAPACITY| Constructor and Description |
|---|
ByteBufSimpleStringPool() |
ByteBufSimpleStringPool(int capacity) |
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 static final int DEFAULT_MAX_LENGTH
public ByteBufSimpleStringPool()
public ByteBufSimpleStringPool(int capacity)
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 © 2022 The Apache Software Foundation. All rights reserved.