eXo Kernel :: Component :: Cache Service 2.4.8-GA

org.exoplatform.services.cache
Interface CachedObjectSelector<K extends Serializable,V>

All Known Implementing Classes:
ExpireKeyStartWithSelector

public interface CachedObjectSelector<K extends Serializable,V>

Created by The eXo Platform SAS
CachedObjectSelector interface provides a way to perform action on selected keys.

Author:
: Thuannd.

Method Summary
 void onSelect(ExoCache<? extends K,? extends V> cache, K key, ObjectCacheInfo<? extends V> ocinfo)
          Action to perform on selected keys
 boolean select(K key, ObjectCacheInfo<? extends V> ocinfo)
          Indicates whether or not a given key must be selected
 

Method Detail

select

boolean select(K key,
               ObjectCacheInfo<? extends V> ocinfo)
Indicates whether or not a given key must be selected

Parameters:
key - the name of the cache entry
ocinfo - the cache info instance
Returns:
true if the selector wants to select the given key, false otherwise

onSelect

void onSelect(ExoCache<? extends K,? extends V> cache,
              K key,
              ObjectCacheInfo<? extends V> ocinfo)
              throws Exception
Action to perform on selected keys

Parameters:
cache - the exo cache
ocinfo - the cache info instance
Throws:
Exception

eXo Kernel :: Component :: Cache Service 2.4.8-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.