use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class ReplicationOperation method run.
@Override
public void run() throws Exception {
ILogger logger = getLogger();
if (logger.isFineEnabled()) {
logger.fine("Moving partitionId=" + getPartitionId() + " to the new owner: " + getNodeEngine().getThisAddress() + " from: " + getCallerAddress());
}
ReplicatedMapService service = getService();
if (data == null) {
return;
}
fillRecordStoreWithRecords(service);
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class RequestMapDataOperation method run.
@Override
public void run() throws Exception {
ILogger logger = getLogger();
int partitionId = getPartitionId();
Address callerAddress = getCallerAddress();
if (logger.isFineEnabled()) {
logger.fine("Caller { " + callerAddress + " } requested copy of map: " + name + " partitionId=" + partitionId);
}
ReplicatedMapService service = getService();
PartitionContainer container = service.getPartitionContainer(partitionId);
ReplicatedRecordStore store = container.getOrCreateRecordStore(name);
store.setLoaded(true);
if (getNodeEngine().getThisAddress().equals(callerAddress)) {
return;
}
long version = store.getVersion();
Set<RecordMigrationInfo> recordSet = getRecordSet(store);
SyncReplicatedMapDataOperation op = new SyncReplicatedMapDataOperation(name, recordSet, version);
op.setPartitionId(partitionId);
op.setValidateTarget(false);
OperationService operationService = getNodeEngine().getOperationService();
operationService.createInvocationBuilder(SERVICE_NAME, op, callerAddress).setTryCount(INVOCATION_TRY_COUNT).invoke();
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class AuthenticationBaseMessageTask method prepareUnauthenticatedClientMessage.
private ClientMessage prepareUnauthenticatedClientMessage() {
Connection connection = endpoint.getConnection();
ILogger logger = clientEngine.getLogger(getClass());
logger.warning("Received auth from " + connection + " with principal " + principal + " , authentication failed");
byte status = AuthenticationStatus.CREDENTIALS_FAILED.getId();
return encodeAuth(status, null, null, null, serializationService.getVersion(), null);
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class LocalLockCleanupOperation method run.
@Override
public void run() throws Exception {
LockStoreImpl lockStore = getLockStore();
LockResource lock = lockStore.getLock(key);
if (uuid.equals(lock.getOwner())) {
ILogger logger = getLogger();
if (logger.isFinestEnabled()) {
logger.finest("Unlocking lock owned by uuid: " + uuid + ", thread-id: " + lock.getThreadId() + ", count: " + lock.getLockCount());
}
response = lockStore.forceUnlock(key);
}
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class UnlockIfLeaseExpiredOperation method run.
@Override
public void run() throws Exception {
LockStoreImpl lockStore = getLockStore();
int lockVersion = lockStore.getVersion(key);
ILogger logger = getLogger();
if (version == lockVersion) {
if (logger.isFinestEnabled()) {
logger.finest("Releasing a lock owned by " + lockStore.getOwnerInfo(key) + " after lease timeout!");
}
forceUnlock();
} else {
if (logger.isFinestEnabled()) {
logger.finest("Won't unlock since lock version is not matching expiration version: " + lockVersion + " vs " + version);
}
}
}
Aggregations