use of com.hazelcast.client.cp.internal.datastructures.atomiclong.AtomicLongProxy in project hazelcast by hazelcast.
the class ClientRaftProxyFactory method createProxy.
@Nonnull
public <T extends DistributedObject> T createProxy(String serviceName, String proxyName) {
proxyName = withoutDefaultGroupName(proxyName);
String objectName = getObjectNameForProxy(proxyName);
RaftGroupId groupId = getGroupId(proxyName, objectName);
if (serviceName.equals(AtomicLongService.SERVICE_NAME)) {
return (T) new AtomicLongProxy(context, groupId, proxyName, objectName);
} else if (serviceName.equals(AtomicRefService.SERVICE_NAME)) {
return (T) new AtomicRefProxy(context, groupId, proxyName, objectName);
} else if (serviceName.equals(CountDownLatchService.SERVICE_NAME)) {
return (T) new CountDownLatchProxy(context, groupId, proxyName, objectName);
} else if (serviceName.equals(LockService.SERVICE_NAME)) {
return (T) createFencedLock(groupId, proxyName, objectName);
} else if (serviceName.equals(SemaphoreService.SERVICE_NAME)) {
return (T) createSemaphore(groupId, proxyName, objectName);
} else {
throw new IllegalArgumentException();
}
}
Aggregations