loci.formats.cache

## Class CacheEvent

- java.lang.Object
- - loci.formats.cache.CacheEvent

-     public class CacheEvent
      extends java.lang.Object

  A event indicating a cache update.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `index` Relevant index to the event, if any.
    `static int` | `OBJECT_DROPPED` Event type indicating an object has been removed from the cache.
    `static int` | `OBJECT_LOADED` Event type indicating an object has been added to the cache.
    `static int` | `ORDER_CHANGED` Event type indicating new planar ordering.
    `static int` | `POSITION_CHANGED` Event type indicating an updated current dimensional position.
    `static int` | `PRIORITIES_CHANGED` Event type indicating new axis priorities.
    `static int` | `RANGE_CHANGED` Event type indicating new planar ordering.
    `protected java.lang.Object` | `source` Source of the cache update.
    `static int` | `SOURCE_CHANGED` Event type indicating a new cache source.
    `static int` | `STRATEGY_CHANGED` Event type indicating a new cache strategy.
    `protected int` | `type` Type of cache event.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CacheEvent(java.lang.Object source, int type)` Constructs a cache event.
    `CacheEvent(java.lang.Object source, int type, int index)` Constructs a cache event.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getIndex()` Gets the index relevant to the cache update, if any.
    `java.lang.Object` | `getSource()` Gets the source of the cache update.
    `int` | `getType()` Gets the type of cache update.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### SOURCE_CHANGED

          public static final int SOURCE_CHANGED

      Event type indicating a new cache source.
      See Also:
        Constant Field Values

    - #### STRATEGY_CHANGED

          public static final int STRATEGY_CHANGED

      Event type indicating a new cache strategy.
      See Also:
        Constant Field Values

    - #### POSITION_CHANGED

          public static final int POSITION_CHANGED

      Event type indicating an updated current dimensional position.
      See Also:
        Constant Field Values

    - #### PRIORITIES_CHANGED

          public static final int PRIORITIES_CHANGED

      Event type indicating new axis priorities.
      See Also:
        Constant Field Values

    - #### ORDER_CHANGED

          public static final int ORDER_CHANGED

      Event type indicating new planar ordering.
      See Also:
        Constant Field Values

    - #### RANGE_CHANGED

          public static final int RANGE_CHANGED

      Event type indicating new planar ordering.
      See Also:
        Constant Field Values

    - #### OBJECT_LOADED

          public static final int OBJECT_LOADED

      Event type indicating an object has been added to the cache.
      See Also:
        Constant Field Values

    - #### OBJECT_DROPPED

          public static final int OBJECT_DROPPED

      Event type indicating an object has been removed from the cache.
      See Also:
        Constant Field Values

    - #### source

          protected java.lang.Object source

      Source of the cache update.

    - #### type

          protected int type

      Type of cache event.

    - #### index

          protected int index

      Relevant index to the event, if any.

  - ### Constructor Detail

    - #### CacheEvent

          public CacheEvent(java.lang.Object source,
                            int type)

      Constructs a cache event.

    - #### CacheEvent

          public CacheEvent(java.lang.Object source,
                            int type,
                            int index)

      Constructs a cache event.

  - ### Method Detail

    - #### getSource

          public java.lang.Object getSource()

      Gets the source of the cache update.

    - #### getType

          public int getType()

      Gets the type of cache update.

    - #### getIndex

          public int getIndex()

      Gets the index relevant to the cache update, if any. This parameter is only set for events POSITION_CHANGED, OBJECT_LOADED and OBJECT_DROPPED.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2026 Open Microscopy Environment