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 final int
     

    Fields inherited from class org.apache.activemq.artemis.utils.AbstractByteBufPool

    DEFAULT_POOL_CAPACITY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
    ByteBufSimpleStringPool(int capacity, int maxCharsLength)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    canPool(io.netty.buffer.ByteBuf byteBuf, int length)
    Returns true if length's byteBuf content from ByteBuf.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)
    Returns true if the entry content is the same of byteBuf at the specified offset and length false otherwise.

    Methods inherited from class org.apache.activemq.artemis.utils.AbstractByteBufPool

    getOrCreate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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
      Returns true if the entry content is the same of byteBuf at the specified offset and length false otherwise.
      Specified by:
      isEqual in class org.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
      Returns true if length's byteBuf content from ByteBuf.readerIndex() can be pooled, false otherwise.
      Specified by:
      canPool in class org.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 class org.apache.activemq.artemis.utils.AbstractByteBufPool<SimpleString>