org.infinispan.client.hotrod
Class RemoteCacheManager

java.lang.Object
  extended by org.infinispan.client.hotrod.RemoteCacheManager
All Implemented Interfaces:
Lifecycle, CacheContainer

public class RemoteCacheManager
extends Object
implements CacheContainer

Factory for RemoteCaches.

Lifecycle:

In order to be able to use an RemoteCache, the RemoteCacheManager must be started first: beside other things, this instantiates connections to Hotrod server(s). Starting the RemoteCacheManager can be done either at creation by passing start==true to constructor or by using a constructor that does that for you (see C-tor documentation); or after construction by calling start().

This is an "expensive" object, as it manages a set of persistent TCP connections to the hotrod servers. It is recommended to only have one instance of this per JVM, and to cache it between calls to the server (i.e. remoteCache operations).

stop() needs to be called explicitly in order to release all the resources (e.g. threads, TCP connections).

Configuration:

The cache manager is configured through a Properties object passed to the C-tor (there are also "simplified" C-tors that rely on default values). Bellow is the list of supported configuration elements: