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. |
getOrCreate
public ByteBufSimpleStringPool()
public ByteBufSimpleStringPool(int capacity, int maxCharsLength)
protected boolean isEqual(SimpleString entry, io.netty.buffer.ByteBuf byteBuf, int offset, int length)
AbstractByteBufPool
true
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)
AbstractByteBufPool
true
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)
AbstractByteBufPool
create
in class AbstractByteBufPool<SimpleString>
Copyright © 2018 JBoss by Red Hat. All rights reserved.