org.ehcache.clustered.client.config
Class ClusteringServiceConfiguration

java.lang.Object
  extended by org.ehcache.clustered.client.config.ClusteringServiceConfiguration
All Implemented Interfaces:
org.ehcache.config.builders.CacheManagerConfiguration<org.ehcache.PersistentCacheManager>, org.ehcache.spi.service.ServiceCreationConfiguration<ClusteringService>

public final class ClusteringServiceConfiguration
extends java.lang.Object
implements org.ehcache.spi.service.ServiceCreationConfiguration<ClusteringService>, org.ehcache.config.builders.CacheManagerConfiguration<org.ehcache.PersistentCacheManager>

Specifies the configuration for a ClusteringService.


Constructor Summary
ClusteringServiceConfiguration(java.net.URI clusterUri)
          Creates a ClusteringServiceConfiguration from the properties provided.
ClusteringServiceConfiguration(java.net.URI clusterUri, boolean autoCreate, ServerSideConfiguration serverConfig)
          Creates a ClusteringServiceConfiguration from the properties provided.
 
Method Summary
 org.ehcache.config.builders.CacheManagerBuilder<org.ehcache.PersistentCacheManager> builder(org.ehcache.config.builders.CacheManagerBuilder<? extends org.ehcache.CacheManager> other)
           
 java.net.URI getClusterUri()
          The URI of the cluster that will be connected to.
 ServerSideConfiguration getServerConfiguration()
          The default server resource to use for caches and pools, or null if one is not defined.
 java.lang.Class<ClusteringService> getServiceType()
           
 boolean isAutoCreate()
          Returns true is server side components should be automatically created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusteringServiceConfiguration

public ClusteringServiceConfiguration(java.net.URI clusterUri)
Creates a ClusteringServiceConfiguration from the properties provided.

Parameters:
clusterUri - the non-null URI identifying the cluster server
Throws:
java.lang.NullPointerException - if clusterUri is null

ClusteringServiceConfiguration

public ClusteringServiceConfiguration(java.net.URI clusterUri,
                                      boolean autoCreate,
                                      ServerSideConfiguration serverConfig)
Creates a ClusteringServiceConfiguration from the properties provided.

Parameters:
clusterUri - the non-null URI identifying the cluster server
autoCreate - true if server components should be auto created
serverConfig - the server side entity configuration required
Throws:
java.lang.NullPointerException - if clusterUri or serverConfig is null
Method Detail

getClusterUri

public java.net.URI getClusterUri()
The URI of the cluster that will be connected to.

Returns:
the cluster URI

isAutoCreate

public boolean isAutoCreate()
Returns true is server side components should be automatically created.

Returns:
true is auto-create is enabled

getServerConfiguration

public ServerSideConfiguration getServerConfiguration()
The default server resource to use for caches and pools, or null if one is not defined.

Returns:
the default server resource

getServiceType

public java.lang.Class<ClusteringService> getServiceType()
Specified by:
getServiceType in interface org.ehcache.spi.service.ServiceCreationConfiguration<ClusteringService>

builder

public org.ehcache.config.builders.CacheManagerBuilder<org.ehcache.PersistentCacheManager> builder(org.ehcache.config.builders.CacheManagerBuilder<? extends org.ehcache.CacheManager> other)
Specified by:
builder in interface org.ehcache.config.builders.CacheManagerConfiguration<org.ehcache.PersistentCacheManager>