/** * Creates a DistributedObject proxy if it is not created yet * * @param name The name of the distributedObject proxy object. * @param publishEvent true if a DistributedObjectEvent should be fired. * @param initialize true if he DistributedObject proxy object should be initialized. * @return The DistributedObject instance if it is created by this method, null otherwise. */ public DistributedObjectFuture createProxy(String name, boolean publishEvent, boolean initialize) { if (proxies.containsKey(name)) { return null; } if (!proxyService.nodeEngine.isRunning()) { throw new HazelcastInstanceNotActiveException(); } DistributedObjectFuture proxyFuture = new DistributedObjectFuture(); if (proxies.putIfAbsent(name, proxyFuture) != null) { return null; } return doCreateProxy(name, publishEvent, initialize, proxyFuture); }
/** * Creates a DistributedObject proxy if it is not created yet * * @param name The name of the distributedObject proxy object. * @param publishEvent true if a DistributedObjectEvent should be fired. * @param initialize true if he DistributedObject proxy object should be initialized. * @return The DistributedObject instance if it is created by this method, null otherwise. */ public DistributedObjectFuture createProxy(String name, boolean publishEvent, boolean initialize) { if (proxies.containsKey(name)) { return null; } if (!proxyService.nodeEngine.isRunning()) { throw new HazelcastInstanceNotActiveException(); } DistributedObjectFuture proxyFuture = new DistributedObjectFuture(); if (proxies.putIfAbsent(name, proxyFuture) != null) { return null; } return doCreateProxy(name, publishEvent, initialize, proxyFuture); }