use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class GroupMismatchOperation method run.
@Override
public void run() {
NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
Connection connection = getConnection();
String message = "Node could not join cluster at node: " + connection.getEndPoint() + " Cause: the target cluster has a different group-name";
connection.close(message, null);
ILogger logger = nodeEngine.getLogger("com.hazelcast.cluster");
logger.warning(message);
Node node = nodeEngine.getNode();
node.getJoiner().blacklist(getCallerAddress(), true);
}
use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class MapStoreWrapper method instrument.
public void instrument(NodeEngine nodeEngine) {
Diagnostics diagnostics = ((NodeEngineImpl) nodeEngine).getDiagnostics();
StoreLatencyPlugin storeLatencyPlugin = diagnostics.getPlugin(StoreLatencyPlugin.class);
if (storeLatencyPlugin == null) {
return;
}
if (mapLoader != null) {
this.mapLoader = new LatencyTrackingMapLoader(mapLoader, storeLatencyPlugin, mapName);
}
if (mapStore != null) {
this.mapStore = new LatencyTrackingMapStore(mapStore, storeLatencyPlugin, mapName);
}
}
use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class Backup method run.
@Override
public void run() throws Exception {
if (!valid) {
onExecutionFailure(new IllegalStateException("Wrong target! " + toString() + " cannot be processed!"));
return;
}
ensureBackupOperationInitialized();
backupOp.beforeRun();
backupOp.run();
backupOp.afterRun();
NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
InternalPartitionService partitionService = nodeEngine.getPartitionService();
partitionService.updatePartitionReplicaVersions(getPartitionId(), replicaVersions, getReplicaIndex());
}
use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class BroadcastTxRollbackOperation method run.
@Override
public void run() throws Exception {
NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
Collection<TransactionalService> services = nodeEngine.getServices(TransactionalService.class);
for (TransactionalService service : services) {
try {
service.rollbackTransaction(txnId);
} catch (Exception e) {
getLogger().warning("Error while rolling back transaction: " + txnId, e);
}
}
}
use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class InvokeOnPartitions method awaitCompletion.
private void awaitCompletion() {
NodeEngineImpl nodeEngine = operationService.nodeEngine;
for (Map.Entry<Address, Future> response : futures.entrySet()) {
try {
Future future = response.getValue();
PartitionResponse result = (PartitionResponse) nodeEngine.toObject(future.get());
result.addResults(partitionResults);
} catch (Throwable t) {
if (operationService.logger.isFinestEnabled()) {
operationService.logger.finest(t);
} else {
operationService.logger.warning(t.getMessage());
}
List<Integer> partitions = memberPartitions.get(response.getKey());
for (Integer partition : partitions) {
partitionResults.put(partition, t);
}
}
}
}
Aggregations