public final class ProxyManager extends Object
ClientProxyFactory
s.Constructor and Description |
---|
ProxyManager(HazelcastClientInstanceImpl client) |
Modifier and Type | Method and Description |
---|---|
String |
addDistributedObjectListener(DistributedObjectListener listener) |
void |
createDistributedObjectsOnCluster(Connection ownerConnection) |
void |
destroy() |
void |
destroyProxy(ClientProxy proxy)
Destroys the given proxy in a cluster-wide way.
|
void |
destroyProxyLocally(String service,
String id)
Locally destroys the proxy identified by the given service and object ID.
|
Address |
findNextAddressToSendCreateRequest() |
ClientProxyFactory |
getClientProxyFactory(String serviceName) |
ClientContext |
getContext() |
Collection<? extends DistributedObject> |
getDistributedObjects() |
HazelcastInstance |
getHazelcastInstance() |
ClientProxy |
getOrCreateProxy(String service,
String id) |
void |
init(ClientConfig config,
ClientContext clientContext) |
void |
register(String serviceName,
Class<? extends ClientProxy> proxyType) |
void |
register(String serviceName,
ClientProxyFactory factory) |
boolean |
removeDistributedObjectListener(String id) |
public ProxyManager(HazelcastClientInstanceImpl client)
public void init(ClientConfig config, ClientContext clientContext)
public ClientContext getContext()
public HazelcastInstance getHazelcastInstance()
public ClientProxyFactory getClientProxyFactory(String serviceName)
public void register(String serviceName, ClientProxyFactory factory)
public void register(String serviceName, Class<? extends ClientProxy> proxyType)
public ClientProxy getOrCreateProxy(String service, String id)
public void destroyProxy(ClientProxy proxy)
Upon successful completion the proxy is unregistered in this proxy manager, all local resources associated with the proxy are released and a distributed object destruction operation is issued to the cluster.
If the given proxy instance is not registered in this proxy manager, the proxy instance is considered stale. In this case, this stale instance is a subject to a local-only destruction and its registered counterpart, if there is any, is a subject to a cluster-wide destruction.
proxy
- the proxy to destroy.public void destroyProxyLocally(String service, String id)
Upon successful completion the proxy is unregistered in this proxy manager and all local resources associated with the proxy are released.
service
- the service associated with the proxy.id
- the ID of the object to destroy the proxy of.public Address findNextAddressToSendCreateRequest()
public Collection<? extends DistributedObject> getDistributedObjects()
public void destroy()
public String addDistributedObjectListener(DistributedObjectListener listener)
public void createDistributedObjectsOnCluster(Connection ownerConnection)
public boolean removeDistributedObjectListener(String id)
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.