Enum Class ProtocolFeatures
- All Implemented Interfaces:
Serializable, Comparable<ProtocolFeatures>, Constable
Feature bits advertised in the
HelloPayload feature bitmap. Each bit
announces a capability the sending node supports; the peer can use the
bitmap AND of its own features to decide which optional protocols the
connection may use.
Bit positions are part of the wire contract and MUST NOT change once
released. New features append new bits; removed features leave a permanent
hole. bitmask(Collection) / fromBitmap(long) convert
between an EnumSet and the 64-bit wire representation.
BLK-2026-04-22-007 Day 1: introduced alongside the HelloPayload
handshake. The bitmap reserves room for the optional protocols queued up
through the remaining BLK-007 days (partition table RPC, cross-group SQL
metadata, partition migration data, 2PC coordinator, CRDT WAN dispatch).
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNode dispatches CRDT WAN events (future — BLK-006+011 v2.2 follow-up).Node emitsgroupIddedup metadata on cross-group SQL results (Day 3).Node implements thePARTITION_MIGRATE_DATAdata shipping path (Days 6-8).Peer accepts endpoint metadata appended toPARTITION_TABLE_RESPONSEpayloads.Node will respond toPARTITION_TABLE_REQUESTopcodes (Day 2).Node converts relative MAP_PUT_WITH_TTL requests to server-assigned absolute expiration before Raft replication.Node implements the cross-group 2PC coordinator + participant (BLK-001).Node supports LZ4-compressed message bodies after PROTOCOL_HELLO negotiation.Node supports zstd-compressed message bodies after PROTOCOL_HELLO negotiation. -
Method Summary
Modifier and TypeMethodDescriptionstatic longbitmask(ProtocolFeatures... features) OR the bitmaps of the supplied features together.static longbitmask(Collection<ProtocolFeatures> features) OR the bitmaps of the supplied features together.intstatic EnumSet<ProtocolFeatures> fromBitmap(long bitmap) Decode a wire bitmap into the set of known features it represents.longmask()unknownBits(long bitmap) Bits in the given bitmap that this build does NOT recognize.static ProtocolFeaturesReturns the enum constant of this class with the specified name.static ProtocolFeatures[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PARTITION_TABLE_RPC
Node will respond toPARTITION_TABLE_REQUESTopcodes (Day 2). -
CROSS_GROUP_SQL_METADATA
Node emitsgroupIddedup metadata on cross-group SQL results (Day 3). -
PARTITION_MIGRATE_DATA
Node implements thePARTITION_MIGRATE_DATAdata shipping path (Days 6-8). -
TX_2PC
Node implements the cross-group 2PC coordinator + participant (BLK-001). -
CRDT_WAN_DISPATCH
Node dispatches CRDT WAN events (future — BLK-006+011 v2.2 follow-up). -
WIRE_COMPRESSION_LZ4
Node supports LZ4-compressed message bodies after PROTOCOL_HELLO negotiation. -
WIRE_COMPRESSION_ZSTD
Node supports zstd-compressed message bodies after PROTOCOL_HELLO negotiation. -
SERVER_ASSIGNED_TTL
Node converts relative MAP_PUT_WITH_TTL requests to server-assigned absolute expiration before Raft replication. -
PARTITION_TABLE_ENDPOINTS
Peer accepts endpoint metadata appended toPARTITION_TABLE_RESPONSEpayloads.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
bitPosition
public int bitPosition()- Returns:
- the index (0..63) of this feature's bit in the wire bitmap
-
mask
public long mask()- Returns:
- the 64-bit mask with only this feature's bit set
-
bitmask
OR the bitmaps of the supplied features together.- Parameters:
features- the features to encode (non-null, may be empty)- Returns:
- the wire bitmap for the feature set
-
bitmask
OR the bitmaps of the supplied features together.- Parameters:
features- the features to encode (non-null, may be empty)- Returns:
- the wire bitmap for the feature set
-
fromBitmap
Decode a wire bitmap into the set of known features it represents. Unknown bits (from a newer peer) are silently ignored — the peer will simply not use those optional protocols when talking to us.- Parameters:
bitmap- the 64-bit wire bitmap- Returns:
- the set of features the peer advertised that this build recognizes
-
unknownBits
Bits in the given bitmap that this build does NOT recognize. Useful for logging (operators can detect rolling-upgrade mismatches in the wild).- Parameters:
bitmap- the 64-bit wire bitmap- Returns:
- the bit positions that are set but not known to this enum
-