Package org.ehcache.spi.service
Interface ServiceCreationConfiguration<T extends Service,R>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ServiceCreationConfiguration<T,?>build(R representation)Construct a new configuration from the given detached representation.default booleancompatibleWith(ServiceCreationConfiguration<?,?> other)Returns true if this configuration can co-exist withotherin the same manager configuration.default Rderive()Derive a detached representation from this configurationjava.lang.Class<T>getServiceType()Indicates which service consumes this configuration at creation.
-
-
-
Method Detail
-
getServiceType
java.lang.Class<T> getServiceType()
Indicates which service consumes this configuration at creation.- Returns:
- the service type
-
derive
default R derive() throws java.lang.UnsupportedOperationException
Derive a detached representation from this configuration- Returns:
- a detached representation
- Throws:
java.lang.UnsupportedOperationException- if the configuration has no representation
-
build
default ServiceCreationConfiguration<T,?> build(R representation) throws java.lang.UnsupportedOperationException
Construct a new configuration from the given detached representation.- Parameters:
representation- a detached representation- Returns:
- a new configuration
- Throws:
java.lang.UnsupportedOperationException- if the configuration has no representation
-
compatibleWith
default boolean compatibleWith(ServiceCreationConfiguration<?,?> other)
Returns true if this configuration can co-exist withotherin the same manager 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 creation configuration- Returns:
trueif the two configurations are compatible
-
-