Class HazelcastCluster
java.lang.Object
com.norconex.crawler.core.cluster.impl.hazelcast.HazelcastCluster
- All Implemented Interfaces:
Cluster,Closeable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbindSession(CrawlerSession session) Binds the given crawl session to this cluster node.protected booleanvoidclose()protected com.hazelcast.core.HazelcastInstancecreateHazelcastInstance(com.hazelcast.config.Config hzConfig) booleanReturns the crawl session bound to this cluster node, ornullif the session has not been bound yet.intReturns the number of nodes in the cluster.Returns the names of all nodes in the cluster.inthashCode()voidbooleanbooleanvoidvoidStarts monitoring for stop signals.voidstop()Requests to stop the cluster.
-
Constructor Details
-
HazelcastCluster
-
-
Method Details
-
getCrawlerId
-
getLocalNode
- Specified by:
getLocalNodein interfaceCluster
-
getCacheManager
- Specified by:
getCacheManagerin interfaceCluster
-
getPipelineManager
- Specified by:
getPipelineManagerin interfaceCluster
-
getCrawlSession
Description copied from interface:ClusterReturns the crawl session bound to this cluster node, ornullif the session has not been bound yet.- Specified by:
getCrawlSessionin interfaceCluster- Returns:
- the crawl session
-
bindSession
Description copied from interface:ClusterBinds the given crawl session to this cluster node. Called once during session initialization.- Specified by:
bindSessionin interfaceCluster- Parameters:
session- the crawl session
-
init
-
createHazelcastInstance
protected com.hazelcast.core.HazelcastInstance createHazelcastInstance(com.hazelcast.config.Config hzConfig) -
startStopMonitoring
public void startStopMonitoring()Description copied from interface:ClusterStarts monitoring for stop signals. Should only be called by commands that need to respond to stop requests (e.g., CrawlerCommand).- Specified by:
startStopMonitoringin interfaceCluster
-
addCoordinatorChangeListener
-
removeCoordinatorChangeListener
-
stop
public void stop()Description copied from interface:ClusterRequests to stop the cluster. Does not wait. -
close
public void close() -
getNodeCount
public int getNodeCount()Description copied from interface:ClusterReturns the number of nodes in the cluster.- Specified by:
getNodeCountin interfaceCluster- Returns:
- node count
-
getNodeNames
Description copied from interface:ClusterReturns the names of all nodes in the cluster.- Specified by:
getNodeNamesin interfaceCluster- Returns:
- node names
-
isStandalone
public boolean isStandalone() -
isClustered
public boolean isClustered() -
equals
-
canEqual
-
hashCode
public int hashCode() -
getWorkDir
-
getConfiguration
-