Class SpringRedisIdempotentRepository

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.redis.processor.idempotent.SpringRedisIdempotentRepository
All Implemented Interfaces:
AutoCloseable, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.IdempotentRepository, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
Direct Known Subclasses:
SpringRedisStringIdempotentRepository

@Metadata(label="bean", description="Idempotent repository that uses Redis to store message ids.", annotations="interfaceName=org.apache.camel.spi.IdempotentRepository") @Configurer(metadataOnly=true) @ManagedResource(description="Spring Redis based message id repository") public class SpringRedisIdempotentRepository extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.spi.IdempotentRepository
  • Constructor Details

    • SpringRedisIdempotentRepository

      public SpringRedisIdempotentRepository()
    • SpringRedisIdempotentRepository

      public SpringRedisIdempotentRepository(org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate, String repositoryName)
    • SpringRedisIdempotentRepository

      public SpringRedisIdempotentRepository(String repositoryName)
  • Method Details

    • redisIdempotentRepository

      public static SpringRedisIdempotentRepository redisIdempotentRepository(String processorName)
    • redisIdempotentRepository

      public static SpringRedisIdempotentRepository redisIdempotentRepository(org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate, String processorName)
    • isFlushOnStartup

      public boolean isFlushOnStartup()
    • setFlushOnStartup

      public void setFlushOnStartup(boolean flushOnStartup)
      Delete all keys of the currently selected database. Be careful if enabling this as all existing data will be deleted.
    • add

      @ManagedOperation(description="Adds the key to the store") public boolean add(String key)
      Specified by:
      add in interface org.apache.camel.spi.IdempotentRepository
    • contains

      @ManagedOperation(description="Does the store contain the given key") public boolean contains(String key)
      Specified by:
      contains in interface org.apache.camel.spi.IdempotentRepository
    • remove

      @ManagedOperation(description="Remove the key from the store") public boolean remove(String key)
      Specified by:
      remove in interface org.apache.camel.spi.IdempotentRepository
    • clear

      @ManagedOperation(description="Clear the store") public void clear()
      Specified by:
      clear in interface org.apache.camel.spi.IdempotentRepository
    • setRepositoryName

      public void setRepositoryName(String repositoryName)
    • getRepositoryName

      @ManagedAttribute(description="The repository name") public String getRepositoryName()
    • confirm

      public boolean confirm(String key)
      Specified by:
      confirm in interface org.apache.camel.spi.IdempotentRepository
    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doShutdown

      protected void doShutdown() throws Exception
      Overrides:
      doShutdown in class org.apache.camel.support.service.BaseService
      Throws:
      Exception