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);
}
}
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class SemaphoreDetachMemberOperation method run.
@Override
public void run() throws Exception {
SemaphoreService service = getService();
if (service.containsSemaphore(name)) {
SemaphoreContainer semaphoreContainer = service.getSemaphoreContainer(name);
response = semaphoreContainer.detachAll(detachedMemberUuid);
}
ILogger logger = getLogger();
if (logger.isFineEnabled()) {
logger.fine("Removing permits attached to " + detachedMemberUuid + ". Result: " + response);
}
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class HazelcastClientInstanceImpl method createAddressProviders.
private Collection<AddressProvider> createAddressProviders(AddressProvider externalAddressProvider) {
ClientNetworkConfig networkConfig = getClientConfig().getNetworkConfig();
final ClientAwsConfig awsConfig = networkConfig.getAwsConfig();
Collection<AddressProvider> addressProviders = new LinkedList<AddressProvider>();
addressProviders.add(new DefaultAddressProvider(networkConfig));
if (externalAddressProvider != null) {
addressProviders.add(externalAddressProvider);
}
if (discoveryService != null) {
addressProviders.add(new DiscoveryAddressProvider(discoveryService, loggingService));
}
if (awsConfig != null && awsConfig.isEnabled()) {
try {
addressProviders.add(new AwsAddressProvider(awsConfig, loggingService));
} catch (NoClassDefFoundError e) {
ILogger logger = loggingService.getLogger(HazelcastClient.class);
logger.warning("hazelcast-aws.jar might be missing!");
throw e;
}
}
return addressProviders;
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class HazelcastClientInstanceImpl method initDiagnostics.
private Diagnostics initDiagnostics(ClientConfig config) {
String name = "diagnostics-client-" + id + "-" + currentTimeMillis();
ILogger logger = loggingService.getLogger(Diagnostics.class);
HazelcastThreadGroup hzThreadGroup = new HazelcastThreadGroup(getName(), logger, config.getClassLoader());
return new Diagnostics(name, logger, hzThreadGroup, properties);
}
Aggregations