Class SimpleString.ByteBufSimpleStringPool
- java.lang.Object
-
- org.apache.activemq.artemis.utils.AbstractByteBufPool<SimpleString>
-
- org.apache.activemq.artemis.api.core.SimpleString.ByteBufSimpleStringPool
-
- Enclosing class:
- SimpleString
public static final class SimpleString.ByteBufSimpleStringPool extends org.apache.activemq.artemis.utils.AbstractByteBufPool<SimpleString>
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_LENGTH
-
Constructor Summary
Constructors Constructor Description ByteBufSimpleStringPool()
ByteBufSimpleStringPool(int capacity)
ByteBufSimpleStringPool(int capacity, int maxCharsLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canPool(io.netty.buffer.ByteBuf byteBuf, int length)
Returnstrue
iflength
'sbyteBuf
content fromByteBuf.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)
Returnstrue
if theentry
content is the same ofbyteBuf
at the specifiedoffset
andlength
false
otherwise.
-
-
-
Field Detail
-
DEFAULT_MAX_LENGTH
public static final int DEFAULT_MAX_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
isEqual
protected boolean isEqual(SimpleString entry, io.netty.buffer.ByteBuf byteBuf, int offset, int length)
Description copied from class:org.apache.activemq.artemis.utils.AbstractByteBufPool
Returnstrue
if theentry
content is the same ofbyteBuf
at the specifiedoffset
andlength
false
otherwise.- Specified by:
isEqual
in classorg.apache.activemq.artemis.utils.AbstractByteBufPool<SimpleString>
-
canPool
protected boolean canPool(io.netty.buffer.ByteBuf byteBuf, int length)
Description copied from class:org.apache.activemq.artemis.utils.AbstractByteBufPool
Returnstrue
iflength
'sbyteBuf
content fromByteBuf.readerIndex()
can be pooled,false
otherwise.- Specified by:
canPool
in classorg.apache.activemq.artemis.utils.AbstractByteBufPool<SimpleString>
-
create
protected SimpleString create(io.netty.buffer.ByteBuf byteBuf, int length)
Description copied from class:org.apache.activemq.artemis.utils.AbstractByteBufPool
Create a new entry.- Specified by:
create
in classorg.apache.activemq.artemis.utils.AbstractByteBufPool<SimpleString>
-
-