Class BlobStore.AbstractRef

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean open_for_write
      Set to true if this large object is open for writing, otherwise the object is an immutable static object.
      protected long reference_id
      The reference identifier.
      protected long size
      The total size of the large object in bytes.
      protected byte type
      The type of large object.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractRef​(long reference_id, byte type, long size, boolean open_for_write)
      Constructs the Ref implementation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void assertIsOpen()
      Asserts that this blob is open for writing.
      (package private) void close()
      Marks this large object as closed to write operations.
      void complete()  
      long getID()  
      long getRawSize()  
      byte getType()  
      int length()  
      void read​(long offset, byte[] buf, int length)  
      void write​(long offset, byte[] buf, int length)  
      • Methods inherited from class java.lang.Object

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

      • reference_id

        protected final long reference_id
        The reference identifier. This is a pointer into the fixed list structure.
      • size

        protected final long size
        The total size of the large object in bytes.
      • type

        protected final byte type
        The type of large object.
      • open_for_write

        private boolean open_for_write
        Set to true if this large object is open for writing, otherwise the object is an immutable static object.
    • Constructor Detail

      • AbstractRef

        AbstractRef​(long reference_id,
                    byte type,
                    long size,
                    boolean open_for_write)
        Constructs the Ref implementation.
    • Method Detail

      • assertIsOpen

        void assertIsOpen()
        Asserts that this blob is open for writing.
      • getRawSize

        public long getRawSize()
      • close

        void close()
        Marks this large object as closed to write operations.
      • length

        public int length()
      • getID

        public long getID()
      • getType

        public byte getType()
      • read

        public void read​(long offset,
                         byte[] buf,
                         int length)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(long offset,
                          byte[] buf,
                          int length)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • complete

        public void complete()
                      throws java.io.IOException
        Throws:
        java.io.IOException