T
- the type which the configured copier can handlepublic class DefaultCopierConfiguration<T> extends org.ehcache.impl.internal.classes.ClassInstanceConfiguration<Copier<T>> implements ServiceConfiguration<CopyProvider,java.lang.Void>
ServiceConfiguration
for the default CopyProvider
implementation.
Enables configuring a Copier
for the key or value of a given cache.
This class overrides the default ServiceConfiguration.compatibleWith(ServiceConfiguration)
implementation
to allow for independent configuration of the key and value copiers.
Modifier and Type | Class and Description |
---|---|
static class |
DefaultCopierConfiguration.Type
Copy provider types
|
Constructor and Description |
---|
DefaultCopierConfiguration(java.lang.Class<? extends Copier<T>> clazz,
DefaultCopierConfiguration.Type type)
Creates a new configuration with the given
Copier class of the provided DefaultCopierConfiguration.Type . |
DefaultCopierConfiguration(Copier<T> instance,
DefaultCopierConfiguration.Type type)
Creates a new configuration with the given
Copier instance of the provided DefaultCopierConfiguration.Type . |
Modifier and Type | Method and Description |
---|---|
boolean |
compatibleWith(ServiceConfiguration<?,?> other)
Returns true if this configuration can co-exist with
other in the same cache configuration. |
java.lang.Class<CopyProvider> |
getServiceType()
Indicates which service this configuration works with.
|
DefaultCopierConfiguration.Type |
getType()
Returns the
DefaultCopierConfiguration.Type of this configuration |
getArguments, getClazz, getInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, derive
public DefaultCopierConfiguration(java.lang.Class<? extends Copier<T>> clazz, DefaultCopierConfiguration.Type type)
Copier
class of the provided DefaultCopierConfiguration.Type
.clazz
- the copier classtype
- the copier type - key or valuepublic DefaultCopierConfiguration(Copier<T> instance, DefaultCopierConfiguration.Type type)
Copier
instance of the provided DefaultCopierConfiguration.Type
.instance
- the copier instancetype
- the copier type - key or valuepublic java.lang.Class<CopyProvider> getServiceType()
getServiceType
in interface ServiceConfiguration<CopyProvider,java.lang.Void>
public boolean compatibleWith(ServiceConfiguration<?,?> other)
ServiceConfiguration
other
in the same cache configuration.
The default implementation of compatibleWith
(as used by many of the implementations) considers any
instance of the same type (or a sub-type) to be incompatible with this instance.
compatibleWith
in interface ServiceConfiguration<CopyProvider,java.lang.Void>
other
- other service configurationtrue
if the two configurations are compatiblepublic DefaultCopierConfiguration.Type getType()
DefaultCopierConfiguration.Type
of this configuration