Class MapSnapshot
java.lang.Object
com.loomcache.server.datastructures.MapSnapshot
Kryo-serializable snapshot of a DistributedMap.
Fields use ArrayList (pre-registered in KryoSerializer) so only the
snapshot class itself plus the user K/V types need registration. User K/V
types must already be registered for wire-level serialization, so the
snapshot contract is consistent with the wire contract.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intEviction metadata captured in strategy-defined order.@Nullable Longbytestatic final bytestatic final bytestatic final intKryo registration ID forMapSnapshot.Max-idle metadata.intTTL metadata.WAN merge/access metadata. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MapSnapshotdeserialize(byte[] data, String mapName, KryoSerializer serializer) booleanbooleanstatic byte[]materialize(byte @Nullable [] baseData, byte[] updateData, String mapName, KryoSerializer serializer) static voidregisterWith(KryoSerializer serializer) RegisterMapSnapshotwith the given Kryo serializer.static byte[]serialize(MapSnapshot snapshot, String mapName, KryoSerializer serializer)
-
Field Details
-
CURRENT_SCHEMA_VERSION
public static final int CURRENT_SCHEMA_VERSION- See Also:
-
KIND_FULL
public static final byte KIND_FULL- See Also:
-
KIND_DELTA
public static final byte KIND_DELTA- See Also:
-
KRYO_REGISTRATION_ID
public static final int KRYO_REGISTRATION_IDKryo registration ID forMapSnapshot. Chosen above the reserved range (10..38) so it never collides with a base registration.- See Also:
-
schemaVersion
public int schemaVersion -
kind
public byte kind -
keys
-
values
-
ttlValues
-
maxIdleDeadlineValues
-
maxIdleNanosValues
-
writeMetadataTimestampValues
-
writeMetadataWriterValues
-
hitCountValues
-
lastAccessMillisValues
-
evictionKeys
-
evictionMetadataValues
-
evictionSelectionState
-
-
Constructor Details
-
MapSnapshot
public MapSnapshot()
-
-
Method Details
-
registerWith
RegisterMapSnapshotwith the given Kryo serializer. Idempotent — safe to call once perKryoSerializerinstance, typically at startup. -
isFullSnapshot
public boolean isFullSnapshot() -
isDeltaSnapshot
public boolean isDeltaSnapshot() -
serialize
-
deserialize
-
materialize
public static byte[] materialize(byte @Nullable [] baseData, byte[] updateData, String mapName, KryoSerializer serializer)
-