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 inherited from class org.apache.activemq.artemis.utils.AbstractByteBufPool
DEFAULT_POOL_CAPACITY
-
Constructor Summary
ConstructorDescriptionByteBufSimpleStringPool
(int capacity) ByteBufSimpleStringPool
(int capacity, int maxCharsLength) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.Methods inherited from class org.apache.activemq.artemis.utils.AbstractByteBufPool
getOrCreate
-
Field Details
-
DEFAULT_MAX_LENGTH
public static final int DEFAULT_MAX_LENGTH- See Also:
-
-
Constructor Details
-
ByteBufSimpleStringPool
public ByteBufSimpleStringPool() -
ByteBufSimpleStringPool
public ByteBufSimpleStringPool(int capacity) -
ByteBufSimpleStringPool
public ByteBufSimpleStringPool(int capacity, int maxCharsLength)
-
-
Method Details
-
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
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>
-