Class HazelcastClusterNode

java.lang.Object
com.norconex.crawler.core.cluster.impl.hazelcast.HazelcastClusterNode
All Implemented Interfaces:
ClusterNode, Closeable, AutoCloseable

public class HazelcastClusterNode extends Object implements ClusterNode, Closeable
  • Constructor Details

    • HazelcastClusterNode

      public HazelcastClusterNode(com.hazelcast.core.HazelcastInstance hazelcastInstance, boolean standalone)
  • Method Details

    • getNodeName

      public String getNodeName()
      Specified by:
      getNodeName in interface ClusterNode
    • isStandaloneNode

      public boolean isStandaloneNode()
      Returns:
      true if this JVM is effectively standalone (single-node mode).
    • isCoordinator

      public boolean isCoordinator()
      Specified by:
      isCoordinator in interface ClusterNode
      Returns:
      true if this node should run "one‑per‑cluster" tasks. - In standalone mode (no clustering at all): true - In clustered mode: true only for the oldest cluster member
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable