public static interface Replica.EntryExternalizable
Modifier and Type | Method and Description |
---|---|
boolean |
identifierCheck(Bytes entry,
int chronicleId)
check that the identifier in the entry is from this node
|
void |
readExternalEntry(ThreadLocalCopies copies,
VanillaChronicleMap.SegmentState segmentState,
Bytes source)
The map implements this method to restore its contents.
|
int |
sizeOfEntry(Bytes entry,
int chronicleId)
The size of entry in bytes
|
void |
writeExternalEntry(Bytes entry,
Bytes destination,
int chronicleId,
long bootstrapTime)
The map implements this method to save its contents.
|
int sizeOfEntry(@NotNull Bytes entry, int chronicleId)
entry
- an entry in the mapchronicleId
- is the channel id used to identify the canonical map or queueboolean identifierCheck(@NotNull Bytes entry, int chronicleId)
entry
- an entry in the mapchronicleId
- is the channel id used to identify the canonical map or queuevoid writeExternalEntry(@NotNull Bytes entry, @NotNull Bytes destination, int chronicleId, long bootstrapTime)
entry
- the byte location of the entry to be storeddestination
- a buffer the entry will be written to, the segment may reject this
operation and add zeroBytes, if the identifier in the entry did not
match the maps localchronicleId
- is the channel id used to identify the canonical map or queuebootstrapTime
- void readExternalEntry(@NotNull ThreadLocalCopies copies, @NotNull VanillaChronicleMap.SegmentState segmentState, @NotNull Bytes source)
writeExternalEntry()
. This method is typically called when we receive a remote
replication event, this event could originate from either a remote put(K key, V
value)
or remove(Object key)
copies
- segmentState
- source
- bytes to read an entry fromCopyright © 2017. All rights reserved.