|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ehcache.impl.persistence.DefaultLocalPersistenceService
public class DefaultLocalPersistenceService
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.ehcache.core.spi.service.LocalPersistenceService |
|---|
LocalPersistenceService.PersistenceSpaceIdentifier |
| Constructor Summary | |
|---|---|
DefaultLocalPersistenceService(PersistenceConfiguration persistenceConfiguration)
|
|
| Method Summary | |
|---|---|
java.util.Collection<ServiceConfiguration<?>> |
additionalConfigurationsForPool(java.lang.String alias,
ResourcePool pool)
Enables this service to create additional configurations to enable support of the passed in resource pool in the context of the given alias. |
void |
create()
Creates the persistent storage. |
FileBasedPersistenceContext |
createPersistenceContextWithin(LocalPersistenceService.PersistenceSpaceIdentifier space,
java.lang.String name)
Creates a new persistence context within the given space. |
void |
destroy(java.lang.String name)
Destroys the persistence space with the given name. |
void |
destroyAll()
Destroys all persistence spaces Note that this method can be called without creating the persistence space beforehand in the same JVM. |
java.io.File |
getDirectoryFor(java.lang.String identifier)
|
LocalPersistenceService.PersistenceSpaceIdentifier |
getOrCreatePersistenceSpace(java.lang.String name)
Retrieves an existing or creates a new persistence space |
boolean |
handlesResourceType(ResourceType resourceType)
Indicates whether this service handles the type of resource passed in. |
void |
start(ServiceProvider<Service> serviceProvider)
Start this service using the provided configuration and ServiceProvider. |
void |
startForMaintenance(ServiceProvider<MaintainableService> serviceProvider)
Start this service for maintenance, based on its default configuration. |
void |
stop()
Stops this service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLocalPersistenceService(PersistenceConfiguration persistenceConfiguration)
| Method Detail |
|---|
public void start(ServiceProvider<Service> serviceProvider)
ServiceServiceProvider.
The goal of the service provider is to allow a service to use other services.
start in interface ServiceserviceProvider - the service provider.public void startForMaintenance(ServiceProvider<MaintainableService> serviceProvider)
MaintainableService
startForMaintenance in interface MaintainableServiceserviceProvider - enables to depend on other maintainable servicespublic void stop()
Service
stop in interface Servicepublic boolean handlesResourceType(ResourceType resourceType)
PersistableResourceService
handlesResourceType in interface PersistableResourceServiceresourceType - the resource type to handle
true if this service handles this resource type, false otherwise
public java.util.Collection<ServiceConfiguration<?>> additionalConfigurationsForPool(java.lang.String alias,
ResourcePool pool)
throws CachePersistenceException
PersistableResourceService
additionalConfigurationsForPool in interface PersistableResourceServicealias - the alias contextpool - the resource pool
Collection of ServiceConfiguration, can be empty
CachePersistenceException - in case of a persistence related problem
public LocalPersistenceService.PersistenceSpaceIdentifier getOrCreatePersistenceSpace(java.lang.String name)
throws CachePersistenceException
LocalPersistenceService
getOrCreatePersistenceSpace in interface LocalPersistenceServicename - the name to be used for the persistence space
LocalPersistenceService.PersistenceSpaceIdentifier
CachePersistenceException - if the persistence space cannot be created
public void destroy(java.lang.String name)
throws CachePersistenceException
PersistableResourceService
destroy in interface PersistableResourceServicename - the name of the persistence context
CachePersistenceException - if the persistence space cannot be destroyedpublic void destroyAll()
LocalPersistenceService
destroyAll in interface LocalPersistenceServicedestroyAll in interface PersistableResourceService
public FileBasedPersistenceContext createPersistenceContextWithin(LocalPersistenceService.PersistenceSpaceIdentifier space,
java.lang.String name)
throws CachePersistenceException
LocalPersistenceService
createPersistenceContextWithin in interface LocalPersistenceServicespace - space to create withinname - name of the context to create
FileBasedPersistenceContext
CachePersistenceExceptionpublic java.io.File getDirectoryFor(java.lang.String identifier)
public void create()
PersistableResourceService
create in interface PersistableResourceService
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||