org.apache.camel.component.redis.processor.idempotent
Class RedisIdempotentRepository

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.component.redis.processor.idempotent.RedisIdempotentRepository
All Implemented Interfaces:
org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.IdempotentRepository<String>, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

@ManagedResource(description="Spring Redis based message id repository")
public class RedisIdempotentRepository
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.IdempotentRepository<String>


Field Summary
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
RedisIdempotentRepository(org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate, String processorName)
           
RedisIdempotentRepository(String processorName)
           
 
Method Summary
 boolean add(String key)
           
 boolean confirm(String key)
           
 boolean contains(String key)
           
protected  void doShutdown()
           
protected  void doStart()
           
protected  void doStop()
           
 String getProcessorName()
           
static RedisIdempotentRepository redisIdempotentRepository(org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate, String processorName)
           
static RedisIdempotentRepository redisIdempotentRepository(String processorName)
           
 boolean remove(String key)
           
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

RedisIdempotentRepository

public RedisIdempotentRepository(org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate,
                                 String processorName)

RedisIdempotentRepository

public RedisIdempotentRepository(String processorName)
Method Detail

redisIdempotentRepository

public static RedisIdempotentRepository redisIdempotentRepository(String processorName)

redisIdempotentRepository

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

add

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

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<String>

remove

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

getProcessorName

@ManagedAttribute(description="The processor name")
public String getProcessorName()

confirm

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

doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class org.apache.camel.support.ServiceSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Specified by:
doStop in class org.apache.camel.support.ServiceSupport
Throws:
Exception

doShutdown

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


Apache Camel