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 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
protected ClusteringServiceConfiguration(ClusteringServiceConfiguration baseConfig)
           
  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.
  ClusteringServiceConfiguration(java.net.URI clusterUri, TimeoutDuration readOperationTimeout)
          Creates a ClusteringServiceConfiguration from the properties provided.
  ClusteringServiceConfiguration(java.net.URI clusterUri, TimeoutDuration readOperationTimeout, boolean autoCreate, ServerSideConfiguration serverConfig)
          Creates a ClusteringServiceConfiguration from the properties provided.
  ClusteringServiceConfiguration(java.net.URI clusterUri, TimeoutDuration readOperationTimeout, 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.
 TimeoutDuration getReadOperationTimeout()
          The timeout for cache read operations.
 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
java.lang.IllegalArgumentException - if clusterUri is not URI valid for cluster operations

ClusteringServiceConfiguration

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

Parameters:
clusterUri - the non-null URI identifying the cluster server
readOperationTimeout - the TimeoutDuration specifying the time limit for clustered cache read operations; if null, the default value is used
Throws:
java.lang.NullPointerException - if clusterUri is null
java.lang.IllegalArgumentException - if clusterUri is not URI valid for cluster operations

ClusteringServiceConfiguration

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

Parameters:
clusterUri - the non-null URI identifying the cluster server
readOperationTimeout - the TimeoutDuration specifying the time limit for clustered cache read operations; if null, the default value is used
serverConfig - the server side entity configuration required
Throws:
java.lang.NullPointerException - if clusterUri or serverConfig is null
java.lang.IllegalArgumentException - if clusterUri is not URI valid for cluster operations

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
java.lang.IllegalArgumentException - if clusterUri is not URI valid for cluster operations

ClusteringServiceConfiguration

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

Parameters:
clusterUri - the non-null URI identifying the cluster server
readOperationTimeout - the TimeoutDuration specifying the time limit for clustered cache read operations; if null, the default value is used
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
java.lang.IllegalArgumentException - if clusterUri is not URI valid for cluster operations

ClusteringServiceConfiguration

protected ClusteringServiceConfiguration(ClusteringServiceConfiguration baseConfig)
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

getReadOperationTimeout

public TimeoutDuration getReadOperationTimeout()
The timeout for cache read operations.

Returns:
the cache read operation timeout; may be null indicating the default timeout is used

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>