Class CacheDescriptor

java.lang.Object
org.nuxeo.ecm.core.cache.CacheDescriptor
All Implemented Interfaces:
Descriptor

public class CacheDescriptor extends Object implements Descriptor
Descriptor of cache contrib
Since:
6.0
  • Field Details

    • DEFAULT_TTL

      public static final long DEFAULT_TTL
      Default TTL in minutes.
      See Also:
    • DEFAULT_MAX_SIZE

      @Deprecated(since="2025.18", forRemoval=true) public static final long DEFAULT_MAX_SIZE
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2025.18, the default is now given by contribution
      Default max size
      Since:
      9.3
      See Also:
    • OPTION_MAX_SIZE

      public static final String OPTION_MAX_SIZE
      Maximum number of entries the cache may contain.
      Since:
      9.3
      See Also:
    • OPTION_CONCURRENCY_LEVEL

      public static final String OPTION_CONCURRENCY_LEVEL
      Since:
      9.3
      See Also:
    • name

      public String name
    • copy

      protected String copy
    • remove

      public boolean remove
    • klass

      protected Class<? extends CacheManagement> klass
    • options

      public Map<String,String> options
  • Constructor Details

    • CacheDescriptor

      public CacheDescriptor()
  • Method Details

    • getId

      public String getId()
      Description copied from interface: Descriptor
      The descriptor id, descriptors with same id are merged.

      To forbid multiple descriptors use UNIQUE_DESCRIPTOR_ID.

      To forbid merge use a unique value, non-overridden toString() for example.

      Specified by:
      getId in interface Descriptor
    • getCopyId

      public String getCopyId()
      Description copied from interface: Descriptor
      Returns the descriptor id to copy for the current descriptor.

      The method returns null by default, this disables the copy mechanism.

      Specified by:
      getCopyId in interface Descriptor
      Returns:
      the descriptor id to copy
    • getTTL

      public long getTTL()
    • setTTL

      public void setTTL(Long value)
    • merge

      public Descriptor merge(Descriptor o)
      Description copied from interface: Descriptor
      Returns a descriptor representing other merged into this

      Default implementation returns other.

      Specified by:
      merge in interface Descriptor
      Returns:
      the merged descriptor
    • doesRemove

      public boolean doesRemove()
      Description copied from interface: Descriptor
      During merge if a descriptor whose doesRemove() returns true is encountered, the merge chain is reset and started again on next descriptor.

      If the last descriptor of same id doesRemove() return true, the descriptor for this id will be null.

      Specified by:
      doesRemove in interface Descriptor