Class ReusablePointer

  • All Implemented Interfaces:
    java.lang.Comparable<Pointer>, org.apache.hugegraph.computer.core.io.Readable, Pointer, Range

    public class ReusablePointer
    extends java.lang.Object
    implements Pointer, org.apache.hugegraph.computer.core.io.Readable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] bytes()
      Only [0 ..
      int compareTo​(Pointer other)  
      org.apache.hugegraph.computer.core.io.RandomAccessInput input()  
      long length()  
      long offset()  
      void read​(org.apache.hugegraph.computer.core.io.RandomAccessInput in)  
      void write​(org.apache.hugegraph.computer.core.io.RandomAccessOutput output)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReusablePointer

        public ReusablePointer()
      • ReusablePointer

        public ReusablePointer​(byte[] bytes,
                               int length)
    • Method Detail

      • read

        public void read​(org.apache.hugegraph.computer.core.io.RandomAccessInput in)
                  throws java.io.IOException
        Specified by:
        read in interface org.apache.hugegraph.computer.core.io.Readable
        Throws:
        java.io.IOException
      • input

        public org.apache.hugegraph.computer.core.io.RandomAccessInput input()
        Specified by:
        input in interface Pointer
      • bytes

        public byte[] bytes()
        Only [0 .. length) of the returned byte array is valid. The extra data [length .. bytes.length) is meaningless, may be left by previous pointer.
        Specified by:
        bytes in interface Pointer
      • write

        public void write​(org.apache.hugegraph.computer.core.io.RandomAccessOutput output)
                   throws java.io.IOException
        Specified by:
        write in interface Pointer
        Throws:
        java.io.IOException
      • offset

        public long offset()
        Specified by:
        offset in interface Range
      • length

        public long length()
        Specified by:
        length in interface Range
      • compareTo

        public int compareTo​(Pointer other)
        Specified by:
        compareTo in interface java.lang.Comparable<Pointer>