Interface Cluster

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
HazelcastCluster, MemoryCluster, MVStoreCluster

public interface Cluster extends Closeable
  • Method Details

    • getNodeCount

      int getNodeCount()
      Returns the number of nodes in the cluster.
      Returns:
      node count
    • getNodeNames

      List<String> getNodeNames()
      Returns the names of all nodes in the cluster.
      Returns:
      node names
    • getLocalNode

      ClusterNode getLocalNode()
    • getCacheManager

      CacheManager getCacheManager()
    • getPipelineManager

      PipelineManager getPipelineManager()
    • getCrawlSession

      CrawlerSession getCrawlSession()
      Returns the crawl session bound to this cluster node, or null if the session has not been bound yet.
      Returns:
      the crawl session
    • bindSession

      void bindSession(CrawlerSession session)
      Binds the given crawl session to this cluster node. Called once during session initialization.
      Parameters:
      session - the crawl session
    • init

      void init(Path crawlerWorkDir, boolean isClustered, Map<String,Class<?>> cacheTypes)
    • init

      default void init(Path crawlerWorkDir, boolean isClustered)
      Convenience overload for tests and simple scenarios that do not need to pre-register cache value types.
      Parameters:
      crawlerWorkDir - working directory
      isClustered - whether running in clustered mode
    • startStopMonitoring

      void startStopMonitoring()
      Starts monitoring for stop signals. Should only be called by commands that need to respond to stop requests (e.g., CrawlerCommand).
    • stop

      void stop()
      Requests to stop the cluster. Does not wait.
    • close

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