java.lang.Object
com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OWALPageChangesPortion
All Implemented Interfaces:
OWALChanges

public final class OWALPageChangesPortion extends Object implements OWALChanges
Since:
8/17/2015
Author:
Andrey Lomakin (a.lomakin-at-orientdb.com) invalid input: '<'lomakin.andrey@gmail.com>.
  • Field Details

  • Constructor Details

    • OWALPageChangesPortion

      public OWALPageChangesPortion()
  • Method Details

    • setLongValue

      public void setLongValue(ByteBuffer pointer, long value, int offset)
      Specified by:
      setLongValue in interface OWALChanges
    • setIntValue

      public void setIntValue(ByteBuffer pointer, int value, int offset)
      Specified by:
      setIntValue in interface OWALChanges
    • setShortValue

      public void setShortValue(ByteBuffer pointer, short value, int offset)
      Specified by:
      setShortValue in interface OWALChanges
    • setByteValue

      public void setByteValue(ByteBuffer pointer, byte value, int offset)
      Specified by:
      setByteValue in interface OWALChanges
    • setBinaryValue

      public void setBinaryValue(ByteBuffer pointer, byte[] value, int offset)
      Specified by:
      setBinaryValue in interface OWALChanges
    • moveData

      public void moveData(ByteBuffer pointer, int from, int to, int len)
      Specified by:
      moveData in interface OWALChanges
    • getLongValue

      public long getLongValue(ByteBuffer pointer, int offset)
      Specified by:
      getLongValue in interface OWALChanges
    • getIntValue

      public int getIntValue(ByteBuffer pointer, int offset)
      Specified by:
      getIntValue in interface OWALChanges
    • getShortValue

      public short getShortValue(ByteBuffer pointer, int offset)
      Specified by:
      getShortValue in interface OWALChanges
    • getByteValue

      public byte getByteValue(ByteBuffer pointer, int offset)
      Specified by:
      getByteValue in interface OWALChanges
    • getBinaryValue

      public byte[] getBinaryValue(ByteBuffer pointer, int offset, int len)
      Specified by:
      getBinaryValue in interface OWALChanges
    • applyChanges

      public void applyChanges(ByteBuffer pointer)
      Description copied from interface: OWALChanges
      Apply the changes to a page.
      Specified by:
      applyChanges in interface OWALChanges
      Parameters:
      pointer - Presents page where apply the changes.
    • serializedSize

      public int serializedSize()
      Description copied from interface: OWALChanges
      Return the size of byte array is needed to serialize all data in it.
      Specified by:
      serializedSize in interface OWALChanges
      Returns:
      the required size.
    • toStream

      public int toStream(int offset, byte[] stream)
      Description copied from interface: OWALChanges
      Serialize the changes to a stream. needed for write the changes to the WAL
      Specified by:
      toStream in interface OWALChanges
      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

      public void toStream(ByteBuffer buffer)
      Specified by:
      toStream in interface OWALChanges
    • fromStream

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

      public void fromStream(ByteBuffer buffer)
      Specified by:
      fromStream in interface OWALChanges
    • hasChanges

      public boolean hasChanges()
      Specified by:
      hasChanges in interface OWALChanges