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
FieldsFields inherited from class org.apache.activemq.artemis.utils.AbstractByteBufPool
DEFAULT_POOL_CAPACITY -
Constructor Summary
ConstructorsConstructorDescriptionByteBufSimpleStringPool(int capacity) ByteBufSimpleStringPool(int capacity, int maxCharsLength) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanPool(io.netty.buffer.ByteBuf byteBuf, int length) Returnstrueiflength'sbyteBufcontent fromByteBuf.readerIndex()can be pooled,falseotherwise.protected SimpleStringcreate(io.netty.buffer.ByteBuf byteBuf, int length) Create a new entry.protected booleanisEqual(SimpleString entry, io.netty.buffer.ByteBuf byteBuf, int offset, int length) Returnstrueif theentrycontent is the same ofbyteBufat the specifiedoffsetandlengthfalseotherwise.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.AbstractByteBufPoolReturnstrueif theentrycontent is the same ofbyteBufat the specifiedoffsetandlengthfalseotherwise.- Specified by:
isEqualin classorg.apache.activemq.artemis.utils.AbstractByteBufPool<SimpleString>- Returns:
trueif theentrycontent is the same ofbyteBufat the specifiedoffsetandlengthfalseotherwise
-
canPool
protected boolean canPool(io.netty.buffer.ByteBuf byteBuf, int length) Description copied from class:org.apache.activemq.artemis.utils.AbstractByteBufPoolReturnstrueiflength'sbyteBufcontent fromByteBuf.readerIndex()can be pooled,falseotherwise.- Specified by:
canPoolin classorg.apache.activemq.artemis.utils.AbstractByteBufPool<SimpleString>- Returns:
trueiflength'sbyteBufcontent fromByteBuf.readerIndex()can be pooled,falseotherwise
-
create
Description copied from class:org.apache.activemq.artemis.utils.AbstractByteBufPoolCreate a new entry.- Specified by:
createin classorg.apache.activemq.artemis.utils.AbstractByteBufPool<SimpleString>
-