org.mule.util.lock
Class MuleLockFactory
java.lang.Object
org.mule.util.lock.MuleLockFactory
- All Implemented Interfaces:
- MuleContextAware, Disposable, Initialisable, LockFactory
public class MuleLockFactory
- extends Object
- implements LockFactory, MuleContextAware, Initialisable, Disposable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MuleLockFactory
public MuleLockFactory()
createLock
public Lock createLock(String lockId)
- Description copied from interface:
LockFactory
- Provides a lock to create thread safe Mule components.
Always returns the same lock for a certain lockId
- Specified by:
createLock in interface LockFactory
- Parameters:
lockId - Id of the lock
- Returns:
- a
Lock instance associated to the lockId
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
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise in interface Initialisable
- Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext in interface MuleContextAware
Copyright © 2003-2013 MuleSoft, Inc.. All Rights Reserved.