Class ClusterReader

java.lang.Object
org.apache.sling.discovery.oak.cluster.ClusterReader

public class ClusterReader extends Object
Helper class to detect instances that are only partially started. Partially in this context means that they have updated their Oak lease but have not written the required data on the Sling level (which includes the idmap, the synctoken and the leaderElectionid).
  • Constructor Details

  • Method Details

    • readInstance

      public InstanceReadResult readInstance(int clusterNodeId, boolean failOnMissingSyncToken, long seqNum) throws PersistenceException
      Reads all discovery.oak related data for clusterNodeId and fills the internal structure with the resulting info - or remembers that the clusterNode was incomplete (partially started)
      Parameters:
      clusterNodeId - the clusterNodeId to be read
      Returns:
      the instance if it is has all required data stored (which does not necessarily mean it has completely started - syncToken is not checked at this stage yet)
      Throws:
      PersistenceException