org.ehcache.event
Interface CacheEventListenerProvider

All Superinterfaces:
Service
All Known Implementing Classes:
DefaultCacheEventListenerProvider

public interface CacheEventListenerProvider
extends Service


Method Summary
<K,V> CacheEventListener<K,V>
createEventListener(java.lang.String alias, ServiceConfiguration<CacheEventListenerProvider> serviceConfiguration)
          Creates a new CacheEventListener
 void releaseEventListener(CacheEventListener<?,?> cacheEventListener)
          Releases a given CacheEventListener
 
Methods inherited from interface org.ehcache.spi.service.Service
start, stop
 

Method Detail

createEventListener

<K,V> CacheEventListener<K,V> createEventListener(java.lang.String alias,
                                                  ServiceConfiguration<CacheEventListenerProvider> serviceConfiguration)
Creates a new CacheEventListener

Type Parameters:
K - the key type for the associated Cache
V - the value type for the associated Cache
Parameters:
alias - the Cache instance's alias in the CacheManager
serviceConfiguration - the configuration instance that will be used to create the CacheEventListener
Returns:
the CacheEventListener to be registered with the given Cache

releaseEventListener

void releaseEventListener(CacheEventListener<?,?> cacheEventListener)
                          throws java.lang.Exception
Releases a given CacheEventListener

Parameters:
cacheEventListener - the CacheEventListener to release
Throws:
java.lang.Exception - when the release fails