Class HazelcastCluster

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

public class HazelcastCluster extends Object implements Cluster
  • Constructor Details

  • Method Details

    • getCrawlerId

      public String getCrawlerId()
    • getLocalNode

      public ClusterNode getLocalNode()
      Specified by:
      getLocalNode in interface Cluster
    • getCacheManager

      public CacheManager getCacheManager()
      Specified by:
      getCacheManager in interface Cluster
    • getPipelineManager

      public PipelineManager getPipelineManager()
      Specified by:
      getPipelineManager in interface Cluster
    • getCrawlSession

      public CrawlerSession getCrawlSession()
      Description copied from interface: Cluster
      Returns the crawl session bound to this cluster node, or null if the session has not been bound yet.
      Specified by:
      getCrawlSession in interface Cluster
      Returns:
      the crawl session
    • bindSession

      public void bindSession(CrawlerSession session)
      Description copied from interface: Cluster
      Binds the given crawl session to this cluster node. Called once during session initialization.
      Specified by:
      bindSession in interface Cluster
      Parameters:
      session - the crawl session
    • init

      public void init(Path workDir, boolean clustered, Map<String,Class<?>> cacheTypes)
      Specified by:
      init in interface Cluster
    • createHazelcastInstance

      protected com.hazelcast.core.HazelcastInstance createHazelcastInstance(com.hazelcast.config.Config hzConfig)
    • startStopMonitoring

      public void startStopMonitoring()
      Description copied from interface: Cluster
      Starts monitoring for stop signals. Should only be called by commands that need to respond to stop requests (e.g., CrawlerCommand).
      Specified by:
      startStopMonitoring in interface Cluster
    • addCoordinatorChangeListener

      public void addCoordinatorChangeListener(CoordinatorChangeListener listener)
    • removeCoordinatorChangeListener

      public void removeCoordinatorChangeListener(CoordinatorChangeListener listener)
    • stop

      public void stop()
      Description copied from interface: Cluster
      Requests to stop the cluster. Does not wait.
      Specified by:
      stop in interface Cluster
    • close

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

      public int getNodeCount()
      Description copied from interface: Cluster
      Returns the number of nodes in the cluster.
      Specified by:
      getNodeCount in interface Cluster
      Returns:
      node count
    • getNodeNames

      public List<String> getNodeNames()
      Description copied from interface: Cluster
      Returns the names of all nodes in the cluster.
      Specified by:
      getNodeNames in interface Cluster
      Returns:
      node names
    • isStandalone

      public boolean isStandalone()
    • isClustered

      public boolean isClustered()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getWorkDir

      public Path getWorkDir()
    • getConfiguration

      public HazelcastClusterConnectorConfig getConfiguration()