Class ExistsInCache

  • All Implemented Interfaces:
    ComponentLifecycle, Condition

    @ComponentProfile(summary="Check the cache for a key",
                      tag="condition,cache",
                      since="3.9.1",
                      recommended=CacheConnection.class)
    public class ExistsInCache
    extends java.lang.Object
    implements Condition
    Condition that checks whether a key exists in a Cache

    In the adapter configuration file this class is aliased as exists-in-cache which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • ExistsInCache

        public ExistsInCache()
    • Method Detail

      • stop

        public void stop()
        Description copied from interface: ComponentLifecycle
        Stop the component

        A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer, calling stop will pause message delivery. Throwing a RuntimeException may cause unintended consequences

        Specified by:
        stop in interface ComponentLifecycle
      • close

        public void close()
        Description copied from interface: ComponentLifecycle
        Closes the component.

        A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException may cause unintended consequences

        Specified by:
        close in interface ComponentLifecycle
      • setConnection

        public void setConnection​(AdaptrisConnection connection)
        Set the connection to the Cache instance.
        Parameters:
        connection - the connection.
      • getKey

        public java.lang.String getKey()
      • setKey

        public void setKey​(java.lang.String key)
        Specify the key to check for in the cache.
        Parameters:
        key - the key.
      • withKey

        public ExistsInCache withKey​(java.lang.String key)