use of com.hazelcast.spi.impl.proxyservice.impl.ProxyInfo in project hazelcast by hazelcast.
the class PostJoinProxyOperation method run.
@Override
public void run() throws Exception {
if (proxies == null || proxies.size() <= 0) {
return;
}
NodeEngine nodeEngine = getNodeEngine();
ProxyServiceImpl proxyService = getService();
ExecutionService executionService = nodeEngine.getExecutionService();
for (final ProxyInfo proxy : proxies) {
final ProxyRegistry registry = proxyService.getOrCreateRegistry(proxy.getServiceName());
try {
executionService.execute(ExecutionService.SYSTEM_EXECUTOR, new Runnable() {
@Override
public void run() {
registry.createProxy(proxy.getObjectName(), false, true);
}
});
} catch (Throwable t) {
getLogger().warning("Cannot create proxy [" + proxy.getServiceName() + ":" + proxy.getObjectName() + "]!", t);
}
}
}
use of com.hazelcast.spi.impl.proxyservice.impl.ProxyInfo in project hazelcast by hazelcast.
the class PostJoinProxyOperation method readInternal.
@Override
protected void readInternal(ObjectDataInput in) throws IOException {
super.readInternal(in);
int len = in.readInt();
if (len > 0) {
proxies = new ArrayList<ProxyInfo>(len);
for (int i = 0; i < len; i++) {
ProxyInfo proxy = new ProxyInfo(in.readUTF(), (String) in.readObject());
proxies.add(proxy);
}
}
}
use of com.hazelcast.spi.impl.proxyservice.impl.ProxyInfo in project hazelcast by hazelcast.
the class PostJoinProxyOperation method writeInternal.
@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
super.writeInternal(out);
int len = proxies != null ? proxies.size() : 0;
out.writeInt(len);
if (len > 0) {
for (ProxyInfo proxy : proxies) {
out.writeUTF(proxy.getServiceName());
out.writeObject(proxy.getObjectName());
// writing as object for backward-compatibility
}
}
}
Aggregations