org.ehcache.clustered.client.config.builders
Class ServerSideConfigurationBuilder

java.lang.Object
  extended by org.ehcache.clustered.client.config.builders.ServerSideConfigurationBuilder
All Implemented Interfaces:
org.ehcache.config.Builder<ClusteringServiceConfiguration>

public class ServerSideConfigurationBuilder
extends java.lang.Object
implements org.ehcache.config.Builder<ClusteringServiceConfiguration>

Constructs the server-side portion of a ClusteringServiceConfiguration. An instance of this class is used in conjunction with ClusteringServiceConfigurationBuilder and is obtained from the autoCreate and expecting methods of that class.


Method Summary
 ClusteringServiceConfiguration build()
           
 ServerSideConfigurationBuilder defaultServerResource(java.lang.String defaultServerResource)
          Sets the default server resource for pools and caches.
 ServerSideConfigurationBuilder resourcePool(java.lang.String name, long size, org.ehcache.config.units.MemoryUnit unit)
          Adds a resource pool with the given name and size and consuming the default server resource.
 ServerSideConfigurationBuilder resourcePool(java.lang.String name, long size, org.ehcache.config.units.MemoryUnit unit, java.lang.String serverResource)
          Adds a resource pool with the given name and size and consuming the given server resource.
 ServerSideConfigurationBuilder resourcePool(java.lang.String name, ServerSideConfiguration.Pool definition)
          Adds a resource pool with the given name and definition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

defaultServerResource

public ServerSideConfigurationBuilder defaultServerResource(java.lang.String defaultServerResource)
Sets the default server resource for pools and caches.

Parameters:
defaultServerResource - default server resource
Returns:
a clustering service configuration builder

resourcePool

public ServerSideConfigurationBuilder resourcePool(java.lang.String name,
                                                   long size,
                                                   org.ehcache.config.units.MemoryUnit unit,
                                                   java.lang.String serverResource)
Adds a resource pool with the given name and size and consuming the given server resource.

Parameters:
name - pool name
size - pool size
unit - pool size unit
serverResource - server resource to consume
Returns:
a clustering service configuration builder

resourcePool

public ServerSideConfigurationBuilder resourcePool(java.lang.String name,
                                                   long size,
                                                   org.ehcache.config.units.MemoryUnit unit)
Adds a resource pool with the given name and size and consuming the default server resource.

Parameters:
name - pool name
size - pool size
unit - pool size unit
Returns:
a clustering service configuration builder

resourcePool

public ServerSideConfigurationBuilder resourcePool(java.lang.String name,
                                                   ServerSideConfiguration.Pool definition)
Adds a resource pool with the given name and definition

Parameters:
name - pool name
definition - pool definition
Returns:
a clustering service configuration builder

build

public ClusteringServiceConfiguration build()
Specified by:
build in interface org.ehcache.config.Builder<ClusteringServiceConfiguration>