Class DirectByteBuffer

    • Constructor Detail

      • DirectByteBuffer

        public DirectByteBuffer​(java.nio.ByteBuffer _buffer)
      • DirectByteBuffer

        public DirectByteBuffer​(byte _allocator,
                                java.nio.ByteBuffer _buffer,
                                DirectByteBufferPool _pool)
      • DirectByteBuffer

        protected DirectByteBuffer​(DirectByteBuffer basis)
        constructor for reference counted version
        Parameters:
        basis -
    • Method Detail

      • setFlag

        public void setFlag​(byte flag)
      • getFlag

        public boolean getFlag​(byte flag)
      • traceUsage

        protected void traceUsage​(byte subsystem,
                                  byte operation)
      • getTraceString

        protected java.lang.String getTraceString()
      • dumpTrace

        protected void dumpTrace​(java.lang.Throwable e)
      • getBufferInternal

        protected java.nio.ByteBuffer getBufferInternal()
      • getAllocator

        protected byte getAllocator()
      • limit

        public int limit​(byte subsystem)
      • limit

        public void limit​(byte subsystem,
                          int l)
      • position

        public int position​(byte subsystem)
      • position

        public void position​(byte subsystem,
                             int l)
      • clear

        public void clear​(byte subsystem)
      • flip

        public void flip​(byte subsystem)
      • remaining

        public int remaining​(byte subsystem)
      • capacity

        public int capacity​(byte subsystem)
      • put

        public void put​(byte subsystem,
                        byte[] data)
      • put

        public void put​(byte subsystem,
                        byte[] data,
                        int offset,
                        int length)
      • put

        public void put​(byte subsystem,
                        java.nio.ByteBuffer data)
      • put

        public void put​(byte subsystem,
                        byte data)
      • putShort

        public void putShort​(byte subsystem,
                             short x)
      • putInt

        public void putInt​(byte subsystem,
                           int data)
      • get

        public byte get​(byte subsystem)
      • get

        public byte get​(byte subsystem,
                        int x)
      • get

        public void get​(byte subsystem,
                        byte[] data)
      • getShort

        public short getShort​(byte subsystem)
      • getInt

        public int getInt​(byte subsystem)
      • getInt

        public int getInt​(byte subsystem,
                          int x)
      • hasRemaining

        public boolean hasRemaining​(byte subsystem)
      • read

        public int read​(byte subsystem,
                        java.nio.channels.FileChannel chan)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public int write​(byte subsystem,
                         java.nio.channels.FileChannel chan)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public int read​(byte subsystem,
                        java.nio.channels.SocketChannel chan)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public int write​(byte subsystem,
                         java.nio.channels.SocketChannel chan)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getBuffer

        public java.nio.ByteBuffer getBuffer​(byte subsystem)
      • returnToPool

        public void returnToPool()
      • hasBeenReturnedToPool

        public boolean hasBeenReturnedToPool()
      • returnToPoolIfNotFree

        public void returnToPoolIfNotFree()
        Normally you should know when a buffer is/isn't free and NOT CALL THIS METHOD However, there are some error situations where the existing code doesn't correctly manage things - we know this and don't want spurious logs occuring as per the above normal method