|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.commerce.util.TransactionLockService
public class TransactionLockService
This class is used to acquire and release locks that are used before and after creating new transactions. This class shouldn't be instantiated directly, but rather created using the TransactionLockFactory
TransactionLockFactory
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
TransactionLockService()
Create a new empty lock service. |
|
TransactionLockService(ClientLockManager pLockManager,
java.lang.String pLockName,
ApplicationLogging pLogger)
Create a new lock service that uses the default key and provides no logging |
Method Summary | |
---|---|
void |
acquireTransactionLock()
Acquire a lock named lockName from clientLockManager |
void |
acquireTransactionLock(java.lang.String pLockName)
Acquire a lock with the given name from clientLockManager |
ClientLockManager |
getClientLockManager()
The ClientLockManager that actually provides the locks |
java.lang.String |
getLockName()
The name of the lock being used |
ApplicationLogging |
getLogger()
Logger to use if logging messages |
boolean |
isEnabled()
If this is false, then acquireTransactionLock and releaseTransactionLock are both no-ops |
boolean |
isLoggingDebug()
This method returns whether or not an debug log event should be broadcast. |
boolean |
isLoggingError()
This method returns whether or not an error log event should be broadcast. |
boolean |
isLoggingInfo()
This method returns whether or not an info log event should be broadcast. |
boolean |
isLoggingWarning()
This method returns whether or not an warning log event should be broadcast. |
void |
logDebug(java.lang.String pMessage)
Logs an debug event with the specified message |
void |
logDebug(java.lang.String pMessage,
java.lang.Throwable pThrowable)
Logs an debug event with the specified message and Throwable |
void |
logDebug(java.lang.Throwable pThrowable)
Logs an debug event with the specified Throwable |
void |
logError(java.lang.String pMessage)
Logs an error event with the specified message |
void |
logError(java.lang.String pMessage,
java.lang.Throwable pThrowable)
Logs an error event with the specified message and Throwable |
void |
logError(java.lang.Throwable pThrowable)
Logs an error event with the specified Throwable |
void |
logInfo(java.lang.String pMessage)
Logs an info event with the specified message |
void |
logInfo(java.lang.String pMessage,
java.lang.Throwable pThrowable)
Logs an info event with the specified message and Throwable |
void |
logInfo(java.lang.Throwable pThrowable)
Logs an info event with the specified Throwable |
void |
logWarning(java.lang.String pMessage)
Logs an warning event with the specified message |
void |
logWarning(java.lang.String pMessage,
java.lang.Throwable pThrowable)
Logs an warning event with the specified message and Throwable |
void |
logWarning(java.lang.Throwable pThrowable)
Logs an warning event with the specified Throwable |
void |
releaseTransactionLock()
Release the lock named lockName from clientLockManager |
void |
releaseTransactionLock(java.lang.String pLockName)
Release the lock with the given name from clientLockManager |
void |
setClientLockManager(ClientLockManager pClientLockManager)
|
void |
setEnabled(boolean pEnabled)
|
void |
setLockName(java.lang.String pLockName)
|
void |
setLogger(ApplicationLogging pLogger)
|
void |
setLoggingDebug(boolean pLogging)
Sets whether or not error log events should be logged. |
void |
setLoggingError(boolean pLogging)
Sets whether or not error log events should be logged. |
void |
setLoggingInfo(boolean pLogging)
Sets whether or not info log events should be logged. |
void |
setLoggingWarning(boolean pLogging)
Sets whether or not warning log events should be logged. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public TransactionLockService()
public TransactionLockService(ClientLockManager pLockManager, java.lang.String pLockName, ApplicationLogging pLogger)
pLockManager
- The lock manager that locks are obtained frompLockName
- The name of the lock to get from pLockManagerpLogger
- This is used to log any messages during acquisition and release of locksMethod Detail |
---|
public void setEnabled(boolean pEnabled)
public boolean isEnabled()
public void setClientLockManager(ClientLockManager pClientLockManager)
public ClientLockManager getClientLockManager()
public void setLockName(java.lang.String pLockName)
public java.lang.String getLockName()
public void setLogger(ApplicationLogging pLogger)
public ApplicationLogging getLogger()
public void acquireTransactionLock() throws DeadlockException, atg.commerce.util.NoLockNameException
lockName
from clientLockManager
DeadlockException
atg.commerce.util.NoLockNameException
public void acquireTransactionLock(java.lang.String pLockName) throws DeadlockException, atg.commerce.util.NoLockNameException
clientLockManager
DeadlockException
atg.commerce.util.NoLockNameException
public void releaseTransactionLock() throws LockManagerException
lockName
from clientLockManager
LockManagerException
public void releaseTransactionLock(java.lang.String pLockName) throws LockManagerException
clientLockManager
LockManagerException
public boolean isLoggingInfo()
ApplicationLogging
isLoggingInfo
in interface ApplicationLogging
ApplicationLogging.isLoggingInfo()
public void setLoggingInfo(boolean pLogging)
ApplicationLogging
setLoggingInfo
in interface ApplicationLogging
ApplicationLogging.setLoggingInfo(boolean)
public boolean isLoggingWarning()
ApplicationLogging
isLoggingWarning
in interface ApplicationLogging
ApplicationLogging.isLoggingWarning()
public void setLoggingWarning(boolean pLogging)
ApplicationLogging
setLoggingWarning
in interface ApplicationLogging
ApplicationLogging.setLoggingWarning(boolean)
public boolean isLoggingError()
ApplicationLogging
isLoggingError
in interface ApplicationLogging
ApplicationLogging.isLoggingError()
public void setLoggingError(boolean pLogging)
ApplicationLogging
setLoggingError
in interface ApplicationLogging
ApplicationLogging.setLoggingError(boolean)
public boolean isLoggingDebug()
ApplicationLogging
isLoggingDebug
in interface ApplicationLogging
ApplicationLogging.isLoggingDebug()
public void setLoggingDebug(boolean pLogging)
ApplicationLogging
setLoggingDebug
in interface ApplicationLogging
ApplicationLogging.setLoggingDebug(boolean)
public void logInfo(java.lang.String pMessage)
ApplicationLogging
logInfo
in interface ApplicationLogging
ApplicationLogging.logInfo(java.lang.String)
public void logInfo(java.lang.Throwable pThrowable)
ApplicationLogging
logInfo
in interface ApplicationLogging
ApplicationLogging.logInfo(java.lang.Throwable)
public void logInfo(java.lang.String pMessage, java.lang.Throwable pThrowable)
ApplicationLogging
logInfo
in interface ApplicationLogging
ApplicationLogging.logInfo(java.lang.String, java.lang.Throwable)
public void logWarning(java.lang.String pMessage)
ApplicationLogging
logWarning
in interface ApplicationLogging
ApplicationLogging.logWarning(java.lang.String)
public void logWarning(java.lang.Throwable pThrowable)
ApplicationLogging
logWarning
in interface ApplicationLogging
ApplicationLogging.logWarning(java.lang.Throwable)
public void logWarning(java.lang.String pMessage, java.lang.Throwable pThrowable)
ApplicationLogging
logWarning
in interface ApplicationLogging
ApplicationLogging.logWarning(java.lang.String, java.lang.Throwable)
public void logError(java.lang.String pMessage)
ApplicationLogging
logError
in interface ApplicationLogging
ApplicationLogging.logError(java.lang.String)
public void logError(java.lang.Throwable pThrowable)
ApplicationLogging
logError
in interface ApplicationLogging
ApplicationLogging.logError(java.lang.Throwable)
public void logError(java.lang.String pMessage, java.lang.Throwable pThrowable)
ApplicationLogging
logError
in interface ApplicationLogging
ApplicationLogging.logError(java.lang.String, java.lang.Throwable)
public void logDebug(java.lang.String pMessage)
ApplicationLogging
logDebug
in interface ApplicationLogging
ApplicationLogging.logDebug(java.lang.String)
public void logDebug(java.lang.Throwable pThrowable)
ApplicationLogging
logDebug
in interface ApplicationLogging
ApplicationLogging.logDebug(java.lang.Throwable)
public void logDebug(java.lang.String pMessage, java.lang.Throwable pThrowable)
ApplicationLogging
logDebug
in interface ApplicationLogging
ApplicationLogging.logDebug(java.lang.String, java.lang.Throwable)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |