Package org.ehcache.spi.service
Interface Service
-
- All Known Subinterfaces:
CacheLoaderWriterProvider,CopyProvider,MaintainableService,PersistableResourceService,ResilienceStrategyProvider,SerializationProvider,WriteBehindProvider
public interface ServiceA life-cycled service that supports cache functionality.Implementation of this interface must be thread-safe.
Since
CacheManagers can be closed and initialized again,Serviceimplementations should support multiple start/stop cycles. Failure to do so will limit the init/close cycles at theCacheManagerlevel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidstart(ServiceProvider<Service> serviceProvider)Start this service using the provided configuration andServiceProvider.voidstop()Stops this service.
-
-
-
Method Detail
-
start
void start(ServiceProvider<Service> serviceProvider)
Start this service using the provided configuration andServiceProvider.The service provider allows a service to retrieve and use other services.
A
Serviceretrieved at this stage may not yet be started. The recommended usage pattern therefore, is to keep a reference to the dependentServicebut use it only when specific methods are invoked on subtypes.- Parameters:
serviceProvider- the service provider
-
stop
void stop()
Stops this service.
-
-