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 AbstractByteBufPool<SimpleString>
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_LENGTH-
Fields inherited from class org.apache.activemq.artemis.utils.AbstractByteBufPool
DEFAULT_POOL_CAPACITY
-
-
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 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 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:AbstractByteBufPoolReturnstrueif theentrycontent is the same ofbyteBufat the specifiedoffsetandlengthfalseotherwise.- Specified by:
isEqualin classAbstractByteBufPool<SimpleString>
-
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<SimpleString>
-
create
protected SimpleString create(io.netty.buffer.ByteBuf byteBuf, int length)
Description copied from class:AbstractByteBufPoolCreate a new entry.- Specified by:
createin classAbstractByteBufPool<SimpleString>
-
-