本文整理了Java中com.hazelcast.instance.Node.isRunning()
方法的一些代码示例,展示了Node.isRunning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.isRunning()
方法的具体详情如下:
包路径:com.hazelcast.instance.Node
类名称:Node
方法名:isRunning
[英]Indicates that node is not shutting down or it has not already shut down
[中]指示节点未关闭或尚未关闭
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public boolean isRunning() {
//no synchronization needed since getState() is atomic.
return instance.node.isRunning();
}
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public boolean isRunning() {
//no synchronization needed since getState() is atomic.
return instance.node.isRunning();
}
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public boolean isRunning() {
return node.isRunning();
}
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public boolean isRunning() {
return node.isRunning();
}
代码示例来源:origin: hazelcast/hazelcast-jet
private <V> V waitOnFuture(Future<V> future) {
try {
return future.get();
} catch (Throwable t) {
if (!node.isRunning()) {
future.cancel(true);
throw new HazelcastInstanceNotActiveException();
} else {
throw ExceptionUtil.rethrow(t);
}
}
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
private <V> V waitOnFuture(Future<V> future) {
try {
return future.get();
} catch (Throwable t) {
if (!node.isRunning()) {
future.cancel(true);
throw new HazelcastInstanceNotActiveException();
} else {
throw ExceptionUtil.rethrow(t);
}
}
}
}
代码示例来源:origin: hazelcast/hazelcast-jet
private boolean isJoined() {
return node.isRunning() && node.getClusterService().isJoined();
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected final boolean shouldRetry() {
return node.isRunning() && !clusterService.isJoined() && !shouldResetHotRestartData();
}
代码示例来源:origin: com.hazelcast/hazelcast-all
private boolean isJoined() {
return node.isRunning() && node.getClusterService().isJoined();
}
代码示例来源:origin: hazelcast/hazelcast-jet
protected final boolean shouldRetry() {
return node.isRunning() && !clusterService.isJoined() && !isMemberExcludedFromHotRestart();
}
代码示例来源:origin: com.hazelcast/hazelcast-all
private boolean ensureNodeIsReady() {
if (clusterService.isJoined() && node.isRunning()) {
return true;
}
if (logger.isFineEnabled()) {
logger.fine("Node is not ready to process join request...");
}
return false;
}
代码示例来源:origin: hazelcast/hazelcast-jet
private boolean ensureNodeIsReady() {
if (clusterService.isJoined() && node.isRunning()) {
return true;
}
if (logger.isFineEnabled()) {
logger.fine("Node is not ready to process join request...");
}
return false;
}
代码示例来源:origin: hazelcast/hazelcast-jet
private void handleHealthReady(HttpGetCommand command) {
Node node = textCommandService.getNode();
if (node.isRunning()
&& node.getNodeExtension().isStartCompleted()) {
command.setResponse(RES_200_WITH_NO_CONTENT);
} else {
command.setResponse(RES_503);
}
}
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public void onMessage(Object msg) {
if (!isValidJoinMessage(msg)) {
logDroppedMessage(msg);
return;
}
JoinMessage joinMessage = (JoinMessage) msg;
if (node.isRunning() && node.getClusterService().isJoined()) {
handleActiveAndJoined(joinMessage);
} else {
handleNotActiveOrNotJoined(joinMessage);
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public void onMessage(Object msg) {
if (!isValidJoinMessage(msg)) {
logDroppedMessage(msg);
return;
}
JoinMessage joinMessage = (JoinMessage) msg;
if (node.isRunning() && node.getClusterService().isJoined()) {
handleActiveAndJoined(joinMessage);
} else {
handleNotActiveOrNotJoined(joinMessage);
}
}
代码示例来源:origin: hazelcast/hazelcast-jet
/** Sends a {@link ShutdownResponseOperation} to the {@code address} or takes a shortcut if shutdown is local. */
private void sendShutdownOperation(Address address) {
if (node.getThisAddress().equals(address)) {
assert !node.isRunning() : "Node state: " + node.getState();
partitionService.onShutdownResponse();
} else {
nodeEngine.getOperationService().send(new ShutdownResponseOperation(), address);
}
}
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public void run() {
if (!node.isRunning() || !node.getNodeExtension().isStartCompleted()
|| !partitionService.areMigrationTasksAllowed()) {
return;
}
nodeEngine.getOperationService().executeOnPartitions(new PartitionAntiEntropyTaskFactory(), getLocalPartitions());
}
代码示例来源:origin: com.hazelcast/hazelcast-all
/** Sends a {@link ShutdownResponseOperation} to the {@code address} or takes a shortcut if shutdown is local. */
private void sendShutdownOperation(Address address) {
if (node.getThisAddress().equals(address)) {
assert !node.isRunning() : "Node state: " + node.getState();
partitionService.onShutdownResponse();
} else {
nodeEngine.getOperationService().send(new ShutdownResponseOperation(), address);
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public void run() {
if (!node.isRunning() || !node.getNodeExtension().isStartCompleted()
|| !partitionService.isMigrationAllowed()) {
return;
}
nodeEngine.getOperationService().executeOnPartitions(new PartitionAntiEntropyTaskFactory(), getLocalPartitions());
}
代码示例来源:origin: hazelcast/hazelcast-jet
private boolean shouldRun() {
ClusterServiceImpl clusterService = node.getClusterService();
if (!clusterService.isJoined()) {
return false;
}
if (!clusterService.isMaster()) {
return false;
}
if (!node.isRunning()) {
return false;
}
final ClusterJoinManager clusterJoinManager = clusterService.getClusterJoinManager();
if (clusterJoinManager.isJoinInProgress()) {
return false;
}
final ClusterState clusterState = clusterService.getClusterState();
return clusterState.isJoinAllowed();
}
内容来源于网络,如有侵权,请联系作者删除!