Interface PreInvalidationListener

All Superinterfaces:
EventListener

public interface PreInvalidationListener extends EventListener
Pre-invalidation listener interface used for selectively overriding invalidation events.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Define cause of invalidation for CLEAR_ALL
    static final int
    Define cause of invalidation for DISK_GARBAGE_COLLECTOR
    static final int
    Define cause of invalidation for DISK_OVERFLOW
    static final int
    Define cause of invalidation for DISK_TIMEOUT
    static final int
    Define cause of invalidation for EXPLICIT
    static final int
    Define cause of invalidation for INACTIVE
    static final int
    Define source of invalidation for LOCAL (cache in memory or disk)
    static final int
    Define cause of invalidation for Least Recently Used(LRU)
    static final int
    Define source of invalidation for REMOTE
    static final int
    Define cause of invalidation for TIMEOUT
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    shouldInvalidate(Object id, int sourceOfInvalidation, int causeOfInvalidation)
    Invoked prior to an invalidation event.
  • Field Details

    • EXPLICIT

      static final int EXPLICIT
      Define cause of invalidation for EXPLICIT
      See Also:
    • LRU

      static final int LRU
      Define cause of invalidation for Least Recently Used(LRU)
      See Also:
    • TIMEOUT

      static final int TIMEOUT
      Define cause of invalidation for TIMEOUT
      See Also:
    • DISK_TIMEOUT

      static final int DISK_TIMEOUT
      Define cause of invalidation for DISK_TIMEOUT
      See Also:
    • CLEAR_ALL

      static final int CLEAR_ALL
      Define cause of invalidation for CLEAR_ALL
      See Also:
    • INACTIVE

      static final int INACTIVE
      Define cause of invalidation for INACTIVE
      See Also:
    • DISK_GARBAGE_COLLECTOR

      static final int DISK_GARBAGE_COLLECTOR
      Define cause of invalidation for DISK_GARBAGE_COLLECTOR
      See Also:
    • DISK_OVERFLOW

      static final int DISK_OVERFLOW
      Define cause of invalidation for DISK_OVERFLOW
      See Also:
    • LOCAL

      static final int LOCAL
      Define source of invalidation for LOCAL (cache in memory or disk)
      See Also:
    • REMOTE

      static final int REMOTE
      Define source of invalidation for REMOTE
      See Also:
  • Method Details

    • shouldInvalidate

      boolean shouldInvalidate(Object id, int sourceOfInvalidation, int causeOfInvalidation)
      Invoked prior to an invalidation event. Returned boolean will determine whether invalidation will be processed or not.
      Parameters:
      id - The cache id
      sourceOfInvalidation - The source of the invalidation, defined in com.ibm.websphere.cache.InvalidationEvent
      causeOfInvalidation - The cause of the invalidation, defined in com.ibm.websphere.cache.InvalidationEvent
      Returns:
      boolean "true" means that the invalidation event should proceed as normal. "false" means that the invalidation event should be canceled.