public class ZookeeperDiscoveryImpl extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DFLT_ZOOKEEPER_DISCOVERY_SPI_ACK_THRESHOLD |
static int |
DFLT_ZOOKEEPER_DISCOVERY_SPI_ACK_TIMEOUT |
static int |
DFLT_ZOOKEEPER_DISCOVERY_SPI_EVTS_THROTTLE |
static int |
DFLT_ZOOKEEPER_DISCOVERY_SPI_MAX_EVTS |
static String |
IGNITE_ZOOKEEPER_DISCOVERY_SPI_ACK_THRESHOLD |
static String |
IGNITE_ZOOKEEPER_DISCOVERY_SPI_ACK_TIMEOUT |
static String |
IGNITE_ZOOKEEPER_DISCOVERY_SPI_EVTS_THROTTLE |
static String |
IGNITE_ZOOKEEPER_DISCOVERY_SPI_MAX_EVTS |
IgniteDiscoverySpiInternalListener |
internalLsnr |
| Constructor and Description |
|---|
ZookeeperDiscoveryImpl(ZookeeperDiscoverySpi spi,
String igniteInstanceName,
IgniteLogger log,
String zkRootPath,
ZookeeperClusterNode locNode,
DiscoverySpiListener lsnr,
DiscoverySpiDataExchange exchange,
IgniteDiscoverySpiInternalListener internalLsnr,
ZookeeperDiscoveryStatistics stats,
JdkMarshaller marsh) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allNodesSupport(IgniteFeatures feature,
IgnitePredicate<ClusterNode> nodesPred) |
void |
failNode(UUID nodeId,
@Nullable String warning) |
UUID |
getCoordinator() |
String |
getSpiState() |
String |
getZkSessionId() |
long |
gridStartTime() |
boolean |
knownNode(UUID nodeId) |
ClusterNode |
localNode() |
@Nullable ZookeeperClusterNode |
node(long nodeOrder) |
@Nullable ZookeeperClusterNode |
node(UUID nodeId) |
boolean |
pingNode(UUID nodeId) |
void |
reconnect() |
Collection<ClusterNode> |
remoteNodes() |
void |
resolveCommunicationError(ClusterNode node0,
Exception err) |
void |
sendCustomMessage(DiscoverySpiCustomMessage msg) |
void |
setGridStartTime(long val)
Sets grid start time.
|
void |
simulateNodeFailure() |
void |
startJoinAndWait()
Starts join procedure and waits for
EventType.EVT_NODE_JOINED event for local node. |
void |
stop() |
static byte[] |
unzip(byte[] zipBytes) |
public static final int DFLT_ZOOKEEPER_DISCOVERY_SPI_ACK_THRESHOLD
public static final int DFLT_ZOOKEEPER_DISCOVERY_SPI_ACK_TIMEOUT
public static final int DFLT_ZOOKEEPER_DISCOVERY_SPI_MAX_EVTS
public static final int DFLT_ZOOKEEPER_DISCOVERY_SPI_EVTS_THROTTLE
@SystemProperty(value="Maximum count of unprocessed events", type=java.lang.Long.class, defaults="5") public static final String IGNITE_ZOOKEEPER_DISCOVERY_SPI_ACK_THRESHOLD
@SystemProperty(value="Timeout to update processed events", type=java.lang.Long.class, defaults="60000") public static final String IGNITE_ZOOKEEPER_DISCOVERY_SPI_ACK_TIMEOUT
@SystemProperty(value="Maximum count of unrpocessed events", type=java.lang.Long.class, defaults="100") public static final String IGNITE_ZOOKEEPER_DISCOVERY_SPI_MAX_EVTS
@SystemProperty(value="Maximum count of events to delay alive nodes change process", type=java.lang.Long.class, defaults="0") public static final String IGNITE_ZOOKEEPER_DISCOVERY_SPI_EVTS_THROTTLE
public volatile IgniteDiscoverySpiInternalListener internalLsnr
public ZookeeperDiscoveryImpl(ZookeeperDiscoverySpi spi, String igniteInstanceName, IgniteLogger log, String zkRootPath, ZookeeperClusterNode locNode, DiscoverySpiListener lsnr, DiscoverySpiDataExchange exchange, IgniteDiscoverySpiInternalListener internalLsnr, ZookeeperDiscoveryStatistics stats, JdkMarshaller marsh)
spi - Discovery SPI.igniteInstanceName - Instance name.log - Logger.zkRootPath - Zookeeper base path node all nodes.locNode - Local node instance.lsnr - Discovery events listener.exchange - Discovery data exchange.internalLsnr - Internal listener (used for testing only).stats - Zookeeper DiscoverySpi statistics collector.marsh - Marshaller.public ClusterNode localNode()
@Nullable public @Nullable ZookeeperClusterNode node(UUID nodeId)
nodeId - Node ID.@Nullable public @Nullable ZookeeperClusterNode node(long nodeOrder)
nodeOrder - Node order.public void resolveCommunicationError(ClusterNode node0, Exception err)
node0 - Problem node IDerr - Connect error.public boolean pingNode(UUID nodeId)
nodeId - Node ID.public void failNode(UUID nodeId, @Nullable @Nullable String warning)
nodeId - Node ID.warning - Warning.public void reconnect()
public Collection<ClusterNode> remoteNodes()
public boolean allNodesSupport(IgniteFeatures feature, IgnitePredicate<ClusterNode> nodesPred)
feature - Feature to check.nodesPred - Predicate to filter cluster nodes.true if all nodes support the given feature, false otherwise.public boolean knownNode(UUID nodeId)
nodeId - Node ID.True if node joined or joining topology.public void sendCustomMessage(DiscoverySpiCustomMessage msg)
msg - Message.public long gridStartTime()
public void setGridStartTime(long val)
val - New time value.public void startJoinAndWait()
throws InterruptedException
EventType.EVT_NODE_JOINED event for local node.InterruptedException - If interrupted.public void simulateNodeFailure()
public void stop()
public static byte[] unzip(byte[] zipBytes)
throws DataFormatException
zipBytes - Zip-compressed bytes.DataFormatException - If compressed data format is invalid.public UUID getCoordinator()
public String getSpiState()
public String getZkSessionId()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 8.9.30 Release Date : February 17 2026