All Known Implementing Classes:
OWALChangesTree, OWALPageChangesPortion

public interface OWALChanges
Keep partial changes of a page for a transaction and original values of chunks of page which were changed using this container.

use get* to access to the original content decorated with the changes. use set* to add a change.

Created by tglman on 24/12/15.

  • Method Details

    • getByteValue

      byte getByteValue(ByteBuffer buffer, int offset)
    • getBinaryValue

      byte[] getBinaryValue(ByteBuffer buffer, int offset, int len)
    • getShortValue

      short getShortValue(ByteBuffer buffer, int offset)
    • getIntValue

      int getIntValue(ByteBuffer buffer, int offset)
    • getLongValue

      long getLongValue(ByteBuffer buffer, int offset)
    • setLongValue

      void setLongValue(ByteBuffer buffer, long value, int offset)
    • setIntValue

      void setIntValue(ByteBuffer buffer, int value, int offset)
    • setShortValue

      void setShortValue(ByteBuffer buffer, short value, int offset)
    • setByteValue

      void setByteValue(ByteBuffer buffer, byte value, int offset)
    • setBinaryValue

      void setBinaryValue(ByteBuffer buffer, byte[] value, int offset)
    • moveData

      void moveData(ByteBuffer buffer, int from, int to, int len)
    • hasChanges

      boolean hasChanges()
    • applyChanges

      void applyChanges(ByteBuffer buffer)
      Apply the changes to a page.
      Parameters:
      buffer - Presents page where apply the changes.
    • serializedSize

      int serializedSize()
      Return the size of byte array is needed to serialize all data in it.
      Returns:
      the required size.
    • toStream

      int toStream(int offset, byte[] stream)
      Serialize the changes to a stream. needed for write the changes to the WAL
      Parameters:
      offset - starting writing offset for the provided buffer.
      stream - buffer where write the content, should be of minimal size of offset+ @{link @serializedSize()}
      Returns:
      the number of written bytes + the offset, can be used as offset of the next operation.
    • toStream

      void toStream(ByteBuffer byteBuffer)
    • fromStream

      int fromStream(int offset, byte[] stream)
      Read changes from a stream. Needed from restore from WAL.
      Parameters:
      offset - the offset in the buffer where start to read.
      stream - the buffer to read.
      Returns:
      the offset+read bytes.
    • fromStream

      void fromStream(ByteBuffer buffer)