Spring Integration

org.springframework.integration.util
Class WhileLockedProcessor

java.lang.Object
  extended by org.springframework.integration.util.WhileLockedProcessor

public abstract class WhileLockedProcessor
extends java.lang.Object

A simple strategy callback class that allows you to provide a code that needs to be executed under Lock provided by LockRegistry A typical usage would be to provide implementation of whileLocked() method and then call doWhileLocked()

Since:
2.2
Author:
Oleg Zhurakousky

Constructor Summary
WhileLockedProcessor(LockRegistry lockRegistry, java.lang.Object key)
           
 
Method Summary
 void doWhileLocked()
           
protected abstract  void whileLocked()
          Override this method to provide the behavior that needs to be executed while under lock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhileLockedProcessor

public WhileLockedProcessor(LockRegistry lockRegistry,
                            java.lang.Object key)
Method Detail

doWhileLocked

public final void doWhileLocked()
                         throws java.io.IOException
Throws:
java.io.IOException

whileLocked

protected abstract void whileLocked()
                             throws java.io.IOException
Override this method to provide the behavior that needs to be executed while under lock

Throws:
java.io.IOException

Spring Integration