Class ClusterConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringsetAdminBindAddress(String)value binding the administrative server to every network interface, so other hosts can reach it.static final StringsetAdminBindAddress(String)value binding the administrative server to the loopback interface only, reachable from the host running the crawler and nowhere else.static final StringDefault administrative server bind address: loopback only.static final intDefault port used to communicate via a node for some administrative crawler cluster tasks. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanNetwork interface the administrative server binds to.intPort the crawler cluster listens to for administrative commands, on each nodes.The connector to the cluster implementation used to run the crawler.inthashCode()booleanDisable launching the crawler administrative server endpoints.booleanWhether the crawler should run in stand-alone or cluster mode.setAdminBindAddress(String adminBindAddress) Network interface the administrative server binds to.setAdminDisabled(boolean adminDisabled) Disable launching the crawler administrative server endpoints.setAdminPort(int adminPort) Port the crawler cluster listens to for administrative commands, on each nodes.setClustered(boolean clustered) Whether the crawler should run in stand-alone or cluster mode.setConnector(ClusterConnector connector) The connector to the cluster implementation used to run the crawler.toString()
-
Field Details
-
DEFAULT_ADMIN_PORT
public static final int DEFAULT_ADMIN_PORTDefault port used to communicate via a node for some administrative crawler cluster tasks.- See Also:
-
ADMIN_BIND_LOOPBACK
setAdminBindAddress(String)value binding the administrative server to the loopback interface only, reachable from the host running the crawler and nowhere else.- See Also:
-
ADMIN_BIND_ANY
setAdminBindAddress(String)value binding the administrative server to every network interface, so other hosts can reach it.- See Also:
-
DEFAULT_ADMIN_BIND_ADDRESS
Default administrative server bind address: loopback only.- See Also:
-
-
Constructor Details
-
ClusterConfig
public ClusterConfig()
-
-
Method Details
-
getConnector
The connector to the cluster implementation used to run the crawler. Default is an MVStore file-backed connector with no external infrastructure. For clustered mode, set this to aHazelcastClusterConnector. For a pure in-memory non-persistent alternative, useMemoryClusterConnector. -
isAdminDisabled
public boolean isAdminDisabled()Disable launching the crawler administrative server endpoints. -
getAdminPort
public int getAdminPort()Port the crawler cluster listens to for administrative commands, on each nodes. Incremented to the next available port in case of conflicts. Default is 27295 (mnemonic: ‘CRAWL’ on a phone keypad). -
getAdminBindAddress
Network interface the administrative server binds to. Accepted values:
- "loopback" (default) — the loopback interface only. The administrative endpoints are then reachable from the host running the crawler and from nowhere else.
-
"any" — every interface. Required for
clustered mode, where nodes and the
stopcommand may run on other hosts. - any host name or IP address — that interface only.
The default is deliberately the restrictive one. The administrative endpoints include stopping the crawl, and they are guarded only by a
crawler-idrequest header, which is an identifier taken from the configuration rather than a secret. Exposing them beyond the host means anyone who can reach the port and name the crawler can halt a crawl, so widening this is an explicit decision. -
isClustered
public boolean isClustered()Whether the crawler should run in stand-alone or cluster mode. Default is standalone, optimized for performance, by eliminating or minimizing inter-node communication. -
setConnector
The connector to the cluster implementation used to run the crawler. Default is an MVStore file-backed connector with no external infrastructure. For clustered mode, set this to aHazelcastClusterConnector. For a pure in-memory non-persistent alternative, useMemoryClusterConnector.- Returns:
this.
-
setAdminDisabled
Disable launching the crawler administrative server endpoints.- Returns:
this.
-
setAdminPort
Port the crawler cluster listens to for administrative commands, on each nodes. Incremented to the next available port in case of conflicts. Default is 27295 (mnemonic: ‘CRAWL’ on a phone keypad).- Returns:
this.
-
setAdminBindAddress
Network interface the administrative server binds to. Accepted values:
- "loopback" (default) — the loopback interface only. The administrative endpoints are then reachable from the host running the crawler and from nowhere else.
-
"any" — every interface. Required for
clustered mode, where nodes and the
stopcommand may run on other hosts. - any host name or IP address — that interface only.
The default is deliberately the restrictive one. The administrative endpoints include stopping the crawl, and they are guarded only by a
crawler-idrequest header, which is an identifier taken from the configuration rather than a secret. Exposing them beyond the host means anyone who can reach the port and name the crawler can halt a crawl, so widening this is an explicit decision.- Returns:
this.
-
setClustered
Whether the crawler should run in stand-alone or cluster mode. Default is standalone, optimized for performance, by eliminating or minimizing inter-node communication.- Returns:
this.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-