Class GatewayMetaState

  • All Implemented Interfaces:
    ClusterStateApplier, CoordinationState.PersistedState

    public class GatewayMetaState
    extends java.lang.Object
    implements ClusterStateApplier, CoordinationState.PersistedState
    This class is responsible for storing/retrieving metadata to/from disk. When instance of this class is created, constructor ensures that this version is compatible with state stored on disk and performs state upgrade if necessary. Also it checks that atomic move is supported on the filesystem level, because it's a must for metadata store algorithm. Please note that the state being loaded when constructing the instance of this class is NOT the state that will be used as a ClusterState.metaData(). Instead when node is starting up, it calls getMetaData() method and if this node is elected as master, it requests metaData from other master eligible nodes. After that, master node performs re-conciliation on the gathered results, re-creates ClusterState and broadcasts this state to other nodes in the cluster.