Class KryoCoreConstants
java.lang.Object
ch.qos.logback.core.kryo.KryoCoreConstants
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic final intstatic final intstatic final intCRC-3 generator polynomialx^3 + x + 1(0b1011), used over the 13 data bits.static final int2-byte entry header layout (big-endian short):static final intstatic final intWithin the 13-bit data word: 12-bit id mask.static final intWithin the 13-bit data word: NEW_ENTRY flag.static final Stringstatic final intMaximum id that may appear in aSerializerBaseentry header (12-bit field).static booleanstatic intSentinel id written on the wire (as 0 in the id field) when a value is not registered in the id map (e.g. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcappedSerializerCapacity(int capacity) Live size of aBidirectionalObjectToIdMap: at least 1, at mostMAX_SERIALIZER_IDso LRU cannot mint an id outside the 12-bit header.
-
Field Details
-
NEW_ENTRY
-
CACHED_ENTRY
-
UNREGISTERED_ID
Sentinel id written on the wire (as 0 in the id field) when a value is not registered in the id map (e.g. frequency-gated first sightings). -
MAX_SERIALIZER_ID
Maximum id that may appear in aSerializerBaseentry header (12-bit field). Ids are assigned starting at 1;UNREGISTERED_IDis encoded as 0.- See Also:
-
ENTRY_HEADER_DATA_BITS
2-byte entry header layout (big-endian short):bits 15-3: 13-bit data bit 12 of data (bit 15 of short): 1 = NEW_ENTRY, 0 = CACHED_ENTRY bits 0-11 of data (bits 14-3 of short): id; 0 means UNREGISTERED_ID on NEW only bits 2-0: 3-bit CRC over the 13 data bits (poly x^3+x+1)- See Also:
-
ENTRY_HEADER_CRC_BITS
- See Also:
-
ENTRY_HEADER_CRC_MASK
- See Also:
-
ENTRY_HEADER_DATA_MASK
- See Also:
-
ENTRY_HEADER_NEW_FLAG
Within the 13-bit data word: NEW_ENTRY flag.- See Also:
-
ENTRY_HEADER_ID_MASK
-
ENTRY_HEADER_CRC3_POLY
CRC-3 generator polynomialx^3 + x + 1(0b1011), used over the 13 data bits.- See Also:
-
KRYO_UNSAFE_PROPERTY_KEY
- See Also:
-
-
Constructor Details
-
KryoCoreConstants
public KryoCoreConstants()
-
-
Method Details
-
cappedSerializerCapacity
Live size of aBidirectionalObjectToIdMap: at least 1, at mostMAX_SERIALIZER_IDso LRU cannot mint an id outside the 12-bit header.
-