Class InitializationMsg

  • Direct Known Subclasses:
    DoneMsg, EntryMsg, ErrorMsg, InitializeRcvAckMsg, InitializeRequestMsg, InitializeTargetMsg

    public abstract class InitializationMsg
    extends ReplicationMsg
    This is an abstract class of messages of the replication protocol for message that needs to contain information about the server that send them and the destination servers to which they should be sent.

    Initialization messages are used when initializing a new replica from an existing replica: total update messages are sent across the topology from the source replica to the target replica, possibly traversing one or two replication servers in the process (e.g. DS1 -> RS1 -> RS2 -> DS2). For this reason we consider them "routable".

    Sender of an initialization message can be a DS or a RS (e.g, in case of Error message). Destination of an initialization message is always a DS.

    • Field Detail

      • destination

        protected ReplicaId destination
        The destination server or servers of this message.
      • senderId

        protected ServerId<?> senderId
        The serverID of the server that sends this message.
    • Constructor Detail

      • InitializationMsg

        public InitializationMsg​(ServerId<?> sender,
                                 ReplicaId destination)
        Creates an initialization message.
        Parameters:
        sender - replication server id
        destination - replication server id
      • InitializationMsg

        public InitializationMsg()
        Creates an initialization message.
    • Method Detail

      • getDestination

        public ReplicaId getDestination()
        Get the destination. The value is a serverId, or ALL_SERVERS dedicated value.
        Returns:
        the destination
      • getSenderID

        public ServerId<?> getSenderID()
        Get the server ID of the server that sent this message.
        Returns:
        the server id