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 nhudinhthuan@yahoo.com
eXo level API
Platform
  • Method Summary

    Modifier and Type
    Method
    Description
    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 Details

    • 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
      key - cache entry key
      ocinfo - the cache info instance
      Throws:
      Exception - Exception