Class 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 int DEFAULT_MAX_LENGTH  
      • Fields inherited from class org.apache.activemq.artemis.utils.AbstractByteBufPool

        DEFAULT_POOL_CAPACITY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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
    • Constructor Detail

      • ByteBufSimpleStringPool

        public ByteBufSimpleStringPool()
      • ByteBufSimpleStringPool

        public ByteBufSimpleStringPool​(int capacity)
      • ByteBufSimpleStringPool

        public ByteBufSimpleStringPool​(int capacity,
                                       int maxCharsLength)
    • Method Detail

      • 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>