use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class ReplicaSyncResponse method prepareOperation.
private void prepareOperation(Operation op) {
int partitionId = getPartitionId();
int replicaIndex = getReplicaIndex();
NodeEngine nodeEngine = getNodeEngine();
ILogger opLogger = nodeEngine.getLogger(op.getClass());
OperationResponseHandler responseHandler = createErrorLoggingResponseHandler(opLogger);
op.setNodeEngine(nodeEngine).setPartitionId(partitionId).setReplicaIndex(replicaIndex).setOperationResponseHandler(responseHandler);
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class MigrationOperation method logMigrationFailure.
private void logMigrationFailure(Throwable e) {
Level level = Level.WARNING;
if (e instanceof IllegalStateException) {
level = Level.FINEST;
}
ILogger logger = getLogger();
if (logger.isLoggable(level)) {
logger.log(level, e.getMessage(), e);
}
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class PartitionStateOperation method run.
@Override
public void run() {
Address callerAddress = getCallerAddress();
partitionState.setEndpoint(callerAddress);
InternalPartitionServiceImpl partitionService = getService();
success = partitionService.processPartitionRuntimeState(partitionState);
ILogger logger = getLogger();
if (logger.isFineEnabled()) {
String message = (success ? "Applied" : "Rejected") + " new partition state. Version: " + partitionState.getVersion() + ", caller: " + callerAddress;
logger.fine(message);
}
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class HeartbeatOperation method run.
@Override
public void run() {
ClusterServiceImpl service = getService();
MemberImpl member = service.getMember(getCallerAddress());
if (member == null) {
ILogger logger = getLogger();
if (logger.isFineEnabled()) {
logger.fine("Heartbeat received from an unknown endpoint: " + getCallerAddress());
}
return;
}
service.getClusterHeartbeatManager().onHeartbeat(member, timestamp);
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class MasterClaimOperation method run.
@Override
public void run() {
final NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
Node node = nodeEngine.getNode();
Joiner joiner = node.getJoiner();
final ILogger logger = node.getLogger(getClass().getName());
if (joiner instanceof TcpIpJoiner) {
TcpIpJoiner tcpIpJoiner = (TcpIpJoiner) joiner;
final Address endpoint = getCallerAddress();
final Address masterAddress = node.getMasterAddress();
approvedAsMaster = !tcpIpJoiner.isClaimingMaster() && !node.isMaster() && (masterAddress == null || masterAddress.equals(endpoint));
} else {
approvedAsMaster = false;
logger.warning("This node requires MulticastJoin strategy!");
}
if (logger.isFineEnabled()) {
logger.fine("Sending '" + approvedAsMaster + "' for master claim of node: " + getCallerAddress());
}
}
Aggregations