org.mule.util.lock
Class ServerLock<T>

java.lang.Object
  extended by org.mule.util.lock.ServerLock<T>
All Implemented Interfaces:
Disposable, Lock<T>

public class ServerLock<T>
extends Object
implements Lock<T>

Default implementation of the Lock interface. Useful for doing locking in a single mule instance.


Nested Class Summary
static class ServerLock.LockEntry
           
 
Field Summary
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
ServerLock()
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 void lock(T key)
           
 void unlock(T key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerLock

public ServerLock()
Method Detail

lock

public void lock(T key)
Specified by:
lock in interface Lock<T>

unlock

public void unlock(T key)
Specified by:
unlock in interface Lock<T>

dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.