Class OWALPageChangesPortion
java.lang.Object
com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OWALPageChangesPortion
- All Implemented Interfaces:
OWALChanges
- Since:
- 8/17/2015
- Author:
- Andrey Lomakin (a.lomakin-at-orientdb.com) invalid input: '<'lomakin.andrey@gmail.com>.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyChanges(ByteBuffer pointer) Apply the changes to a page.intfromStream(int offset, byte[] stream) Read changes from a stream.voidfromStream(ByteBuffer buffer) byte[]getBinaryValue(ByteBuffer pointer, int offset, int len) bytegetByteValue(ByteBuffer pointer, int offset) intgetIntValue(ByteBuffer pointer, int offset) longgetLongValue(ByteBuffer pointer, int offset) shortgetShortValue(ByteBuffer pointer, int offset) booleanvoidmoveData(ByteBuffer pointer, int from, int to, int len) intReturn the size of byte array is needed to serialize all data in it.voidsetBinaryValue(ByteBuffer pointer, byte[] value, int offset) voidsetByteValue(ByteBuffer pointer, byte value, int offset) voidsetIntValue(ByteBuffer pointer, int value, int offset) voidsetLongValue(ByteBuffer pointer, long value, int offset) voidsetShortValue(ByteBuffer pointer, short value, int offset) inttoStream(int offset, byte[] stream) Serialize the changes to a stream. needed for write the changes to the WALvoidtoStream(ByteBuffer buffer)
-
Field Details
-
PORTION_BYTES
public static final int PORTION_BYTES- See Also:
-
-
Constructor Details
-
OWALPageChangesPortion
public OWALPageChangesPortion()
-
-
Method Details
-
setLongValue
- Specified by:
setLongValuein interfaceOWALChanges
-
setIntValue
- Specified by:
setIntValuein interfaceOWALChanges
-
setShortValue
- Specified by:
setShortValuein interfaceOWALChanges
-
setByteValue
- Specified by:
setByteValuein interfaceOWALChanges
-
setBinaryValue
- Specified by:
setBinaryValuein interfaceOWALChanges
-
moveData
- Specified by:
moveDatain interfaceOWALChanges
-
getLongValue
- Specified by:
getLongValuein interfaceOWALChanges
-
getIntValue
- Specified by:
getIntValuein interfaceOWALChanges
-
getShortValue
- Specified by:
getShortValuein interfaceOWALChanges
-
getByteValue
- Specified by:
getByteValuein interfaceOWALChanges
-
getBinaryValue
- Specified by:
getBinaryValuein interfaceOWALChanges
-
applyChanges
Description copied from interface:OWALChangesApply the changes to a page.- Specified by:
applyChangesin interfaceOWALChanges- Parameters:
pointer- Presents page where apply the changes.
-
serializedSize
public int serializedSize()Description copied from interface:OWALChangesReturn the size of byte array is needed to serialize all data in it.- Specified by:
serializedSizein interfaceOWALChanges- Returns:
- the required size.
-
toStream
public int toStream(int offset, byte[] stream) Description copied from interface:OWALChangesSerialize the changes to a stream. needed for write the changes to the WAL- Specified by:
toStreamin interfaceOWALChanges- 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
- Specified by:
toStreamin interfaceOWALChanges
-
fromStream
public int fromStream(int offset, byte[] stream) Description copied from interface:OWALChangesRead changes from a stream. Needed from restore from WAL.- Specified by:
fromStreamin interfaceOWALChanges- Parameters:
offset- the offset in the buffer where start to read.stream- the buffer to read.- Returns:
- the offset+read bytes.
-
fromStream
- Specified by:
fromStreamin interfaceOWALChanges
-
hasChanges
public boolean hasChanges()- Specified by:
hasChangesin interfaceOWALChanges
-