Class TypedProperties.StringValue.ByteBufStringValuePool
java.lang.Object
org.apache.activemq.artemis.utils.AbstractByteBufPool<TypedProperties.StringValue>
org.apache.activemq.artemis.utils.collections.TypedProperties.StringValue.ByteBufStringValuePool
- Enclosing class:
- TypedProperties.StringValue
public static final class TypedProperties.StringValue.ByteBufStringValuePool
extends AbstractByteBufPool<TypedProperties.StringValue>
-
Field Summary
FieldsFields inherited from class org.apache.activemq.artemis.utils.AbstractByteBufPool
DEFAULT_POOL_CAPACITY -
Constructor Summary
ConstructorsConstructorDescriptionByteBufStringValuePool(int capacity) ByteBufStringValuePool(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 TypedProperties.StringValuecreate(io.netty.buffer.ByteBuf byteBuf, int length) Create a new entry.protected booleanisEqual(TypedProperties.StringValue 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
-
ByteBufStringValuePool
public ByteBufStringValuePool() -
ByteBufStringValuePool
public ByteBufStringValuePool(int capacity) -
ByteBufStringValuePool
public ByteBufStringValuePool(int capacity, int maxCharsLength)
-
-
Method Details
-
isEqual
protected boolean isEqual(TypedProperties.StringValue entry, io.netty.buffer.ByteBuf byteBuf, int offset, int length) Description copied from class:AbstractByteBufPoolReturnstrueif theentrycontent is the same ofbyteBufat the specifiedoffsetandlengthfalseotherwise.- Specified by:
isEqualin classAbstractByteBufPool<TypedProperties.StringValue>- Returns:
trueif theentrycontent is the same ofbyteBufat the specifiedoffsetandlengthfalseotherwise
-
canPool
protected boolean canPool(io.netty.buffer.ByteBuf byteBuf, int length) Description copied from class:AbstractByteBufPoolReturnstrueiflength'sbyteBufcontent fromByteBuf.readerIndex()can be pooled,falseotherwise.- Specified by:
canPoolin classAbstractByteBufPool<TypedProperties.StringValue>- Returns:
trueiflength'sbyteBufcontent fromByteBuf.readerIndex()can be pooled,falseotherwise
-
create
Description copied from class:AbstractByteBufPoolCreate a new entry.- Specified by:
createin classAbstractByteBufPool<TypedProperties.StringValue>
-