@Deprecated public abstract class AbstractResourceManager extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_COMMIT_TIMEOUT_FACTOR
Deprecated.
|
protected static int |
DEFAULT_TIMEOUT_MSECS
Deprecated.
|
protected long |
defaultTimeout
Deprecated.
|
protected boolean |
dirty
Deprecated.
|
protected Collection<AbstractTransactionContext> |
globalTransactions
Deprecated.
|
protected Log |
logger
Deprecated.
|
protected static int |
OPERATION_MODE_RECOVERING
Deprecated.
|
protected static int |
OPERATION_MODE_STARTED
Deprecated.
|
protected static int |
OPERATION_MODE_STARTING
Deprecated.
|
protected static int |
OPERATION_MODE_STOPPED
Deprecated.
|
protected static int |
OPERATION_MODE_STOPPING
Deprecated.
|
protected int |
operationMode
Deprecated.
|
static int |
SHUTDOWN_MODE_KILL
Deprecated.
Shutdown mode: Try to stop active transaction NOW, do no rollbacks
|
static int |
SHUTDOWN_MODE_NORMAL
Deprecated.
Shutdown mode: Wait for all transactions to complete
|
static int |
SHUTDOWN_MODE_ROLLBACK
Deprecated.
Shutdown mode: Try to roll back all active transactions
|
Constructor and Description |
---|
AbstractResourceManager()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
assureReady()
Deprecated.
Check that the FileManager is ready.
|
protected void |
assureStarted()
Deprecated.
Check that the FileManager is started.
|
void |
beginTransaction(AbstractTransactionContext context)
Deprecated.
|
void |
commitTransaction(AbstractTransactionContext context)
Deprecated.
|
protected abstract AbstractTransactionContext |
createTransactionContext(Object session)
Deprecated.
|
protected abstract void |
doBegin(AbstractTransactionContext context)
Deprecated.
|
protected abstract void |
doCommit(AbstractTransactionContext context)
Deprecated.
|
protected abstract int |
doPrepare(AbstractTransactionContext context)
Deprecated.
|
protected abstract void |
doRollback(AbstractTransactionContext context)
Deprecated.
|
protected void |
doStart()
Deprecated.
|
long |
getDefaultTransactionTimeout()
Deprecated.
Gets the default transaction timeout in milliseconds.
|
int |
prepareTransaction(AbstractTransactionContext context)
Deprecated.
|
protected void |
recover()
Deprecated.
|
void |
rollbackTransaction(AbstractTransactionContext context)
Deprecated.
|
void |
setDefaultTransactionTimeout(long timeout)
Deprecated.
Sets the default transaction timeout.
|
protected void |
setDirty(AbstractTransactionContext context,
Throwable t)
Deprecated.
Flag this resource manager as dirty.
|
void |
setTransactionRollbackOnly(AbstractTransactionContext context)
Deprecated.
|
protected boolean |
shutdown(int mode,
long timeoutMSecs)
Deprecated.
|
void |
start()
Deprecated.
|
AbstractTransactionContext |
startTransaction(Object session)
Deprecated.
Starts a new transaction and associates it with the current thread.
|
void |
stop()
Deprecated.
|
boolean |
stop(int mode)
Deprecated.
|
boolean |
stop(int mode,
long timeOut)
Deprecated.
|
protected boolean |
waitForAllTxToStop(long timeoutMSecs)
Deprecated.
|
public static final int SHUTDOWN_MODE_NORMAL
public static final int SHUTDOWN_MODE_ROLLBACK
public static final int SHUTDOWN_MODE_KILL
protected static final int OPERATION_MODE_STOPPED
protected static final int OPERATION_MODE_STOPPING
protected static final int OPERATION_MODE_STARTED
protected static final int OPERATION_MODE_STARTING
protected static final int OPERATION_MODE_RECOVERING
protected static final int DEFAULT_TIMEOUT_MSECS
protected static final int DEFAULT_COMMIT_TIMEOUT_FACTOR
protected Collection<AbstractTransactionContext> globalTransactions
protected int operationMode
protected long defaultTimeout
protected Log logger
protected boolean dirty
public void start() throws ResourceManagerSystemException
ResourceManagerSystemException
protected void doStart() throws ResourceManagerSystemException
ResourceManagerSystemException
protected void recover() throws ResourceManagerSystemException
ResourceManagerSystemException
public void stop() throws ResourceManagerSystemException
ResourceManagerSystemException
public boolean stop(int mode) throws ResourceManagerSystemException
ResourceManagerSystemException
public boolean stop(int mode, long timeOut) throws ResourceManagerSystemException
ResourceManagerSystemException
protected boolean shutdown(int mode, long timeoutMSecs)
public long getDefaultTransactionTimeout()
public void setDefaultTransactionTimeout(long timeout)
timeout
- timeout in millisecondspublic AbstractTransactionContext startTransaction(Object session) throws ResourceManagerException
#commitTransaction(org.mule.util.xa.AbstractTransactionContext)
is called. Use
#rollbackTransaction(org.mule.util.xa.AbstractTransactionContext)
to discard your changes. After
calling either method there will be no transaction associated to the current thread any
longer. ResourceManagerException
#prepareTransaction(org.mule.util.xa.AbstractTransactionContext)
,
#commitTransaction(org.mule.util.xa.AbstractTransactionContext)
,
#rollbackTransaction(org.mule.util.xa.AbstractTransactionContext)
public void beginTransaction(AbstractTransactionContext context) throws ResourceManagerException
ResourceManagerException
public int prepareTransaction(AbstractTransactionContext context) throws ResourceManagerException
ResourceManagerException
public void rollbackTransaction(AbstractTransactionContext context) throws ResourceManagerException
ResourceManagerException
public void setTransactionRollbackOnly(AbstractTransactionContext context) throws ResourceManagerException
ResourceManagerException
public void commitTransaction(AbstractTransactionContext context) throws ResourceManagerException
ResourceManagerException
protected abstract AbstractTransactionContext createTransactionContext(Object session)
protected abstract void doBegin(AbstractTransactionContext context)
protected abstract int doPrepare(AbstractTransactionContext context) throws ResourceManagerException
ResourceManagerException
protected abstract void doCommit(AbstractTransactionContext context) throws ResourceManagerException
ResourceManagerException
protected abstract void doRollback(AbstractTransactionContext context) throws ResourceManagerException
ResourceManagerException
protected boolean waitForAllTxToStop(long timeoutMSecs)
protected void setDirty(AbstractTransactionContext context, Throwable t)
context
- t
- protected void assureStarted() throws ResourceManagerSystemException
FileManagerSystemException
- if the FileManager is not started.ResourceManagerSystemException
protected void assureReady() throws ResourceManagerSystemException
FileManagerSystemException
- if the FileManager is neither started not
stopping.ResourceManagerSystemException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.