Package org.apache.ignite.client.handler
Class ClientResourceRegistry
java.lang.Object
org.apache.ignite.client.handler.ClientResourceRegistry
Per-connection resource registry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the registry and releases all resources.get(long id) Gets the resource by id.longput(ClientResource obj) Stores the resource and returns the generated id.remove(long id) Removes the resource.
-
Constructor Details
-
ClientResourceRegistry
public ClientResourceRegistry()
-
-
Method Details
-
put
public long put(ClientResource obj) throws org.apache.ignite.internal.lang.IgniteInternalCheckedException Stores the resource and returns the generated id.- Parameters:
obj- Object.- Returns:
- Id.
- Throws:
org.apache.ignite.internal.lang.IgniteInternalCheckedException
-
get
public ClientResource get(long id) throws org.apache.ignite.internal.lang.IgniteInternalCheckedException Gets the resource by id.- Parameters:
id- Id.- Returns:
- Object.
- Throws:
org.apache.ignite.internal.lang.IgniteInternalCheckedException
-
remove
public ClientResource remove(long id) throws org.apache.ignite.internal.lang.IgniteInternalCheckedException Removes the resource.- Parameters:
id- Id.- Throws:
org.apache.ignite.internal.lang.IgniteInternalCheckedException
-
close
public void close()Closes the registry and releases all resources.
-