Package org.ehcache.spi.service
Interface ServiceConfiguration<T extends Service,R>
- Type Parameters:
T- the service type this configuration works withR- the type of the detached representation
- All Known Subinterfaces:
CacheLoaderWriterConfiguration<R>,PersistableResourceService.PersistenceSpaceIdentifier<T>,WriteBehindConfiguration<R>
public interface ServiceConfiguration<T extends Service,R>
A configuration type to be used when interacting with a
Service.-
Method Summary
Modifier and TypeMethodDescriptiondefault ServiceConfiguration<T,?> Construct a new configuration from the given detached representation.default booleancompatibleWith(ServiceConfiguration<?, ?> other) Returns true if this configuration can co-exist withotherin the same cache configuration.default Rderive()Derive a detached representation from this configurationIndicates which service this configuration works with.
-
Method Details
-
getServiceType
Indicates which service this configuration works with.- Returns:
- the service type
-
derive
Derive a detached representation from this configuration- Returns:
- a detached representation
- Throws:
UnsupportedOperationException- if the configuration has no representation
-
build
Construct a new configuration from the given detached representation.- Parameters:
representation- a detached representation- Returns:
- a new configuration
- Throws:
UnsupportedOperationException- if the configuration has no representation
-
compatibleWith
Returns true if this configuration can co-exist withotherin 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.- Parameters:
other- other service configuration- Returns:
trueif the two configurations are compatible
-