Package fr.dyade.aaa.util
Interface NTransactionMBean
-
- All Superinterfaces:
TransactionMBean
- All Known Implementing Classes:
NTransaction
public interface NTransactionMBean extends TransactionMBean
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidgarbage()Garbage the log file.voidgarbageAsync(boolean async)Sets asynchronous garbage.intgetGarbageCount()Returns the number of garbage operation since starting up.intgetGarbageDelay()Returns the maximum time between two garbages, 0 if disable.intgetGarbageRatio()Returns the ratio of garbage operations since starting up.longgetGarbageTime()Returns the cumulated time of garbage operations.intgetLogFileSize()Returns the size of disk log in Mb.intgetLogMemoryCapacity()Returns the initial capacity of global in memory log (by default 4096).intgetLogMemorySize()Returns the size of memory log in byte.intgetLogThresholdOperation()Returns the pool size foroperationobjects, by default 1000.intgetMaxLogFileSize()Returns the maximum size of disk log in Mb, by default 16Mb.intgetMaxLogMemorySize()Returns the maximum size of memory log in Kb, by default 2048Kb.intgetNbBadDeletedObjects()Returns the number of useless delete operation on repository.intgetNbDeletedObjects()Returns the number of delete operation on repository.intgetNbLoadedObjects()Returns the number of load operation from repository.intgetNbSavedObjects()Returns the number of save operation to repository.StringgetRepositoryImpl()booleanisGarbageRunning()Returns the status of the garbage thread.booleanisSyncOnWrite()Returns true if every write in the log file is synced to disk.voidsetGarbageDelay(int timeout)Sets the maximum time between two garbages, 0 to disable the asynchronous garbage mechanism.voidsetMaxLogFileSize(int size)Sets the maximum size of disk log in Mb.voidsetMaxLogMemorySize(int size)Sets the maximum size of memory log in Kb.-
Methods inherited from interface fr.dyade.aaa.util.TransactionMBean
backup, dumpObjectList, getCommitCount, getObject, getObjectList, getPhase, getPhaseInfo, getStartTime, isPersistent, useLoadAll
-
-
-
-
Method Detail
-
getLogMemoryCapacity
int getLogMemoryCapacity()
Returns the initial capacity of global in memory log (by default 4096).- Returns:
- The initial capacity of global in memory log.
-
getMaxLogMemorySize
int getMaxLogMemorySize()
Returns the maximum size of memory log in Kb, by default 2048Kb.- Returns:
- The maximum size of memory log in Kb.
-
setMaxLogMemorySize
void setMaxLogMemorySize(int size)
Sets the maximum size of memory log in Kb.- Parameters:
size- The maximum size of memory log in Kb.
-
getLogMemorySize
int getLogMemorySize()
Returns the size of memory log in byte.- Returns:
- The size of memory log in byte.
-
getMaxLogFileSize
int getMaxLogFileSize()
Returns the maximum size of disk log in Mb, by default 16Mb.- Returns:
- The maximum size of disk log in Mb.
-
setMaxLogFileSize
void setMaxLogFileSize(int size)
Sets the maximum size of disk log in Mb.- Parameters:
size- The maximum size of disk log in Mb.
-
getLogFileSize
int getLogFileSize()
Returns the size of disk log in Mb.- Returns:
- The size of disk log in Mb.
-
isSyncOnWrite
boolean isSyncOnWrite()
Returns true if every write in the log file is synced to disk.- Returns:
- true if every write in the log file is synced to disk.
-
getLogThresholdOperation
int getLogThresholdOperation()
Returns the pool size foroperationobjects, by default 1000.- Returns:
- The pool size for
operationobjects.
-
getGarbageCount
int getGarbageCount()
Returns the number of garbage operation since starting up.- Returns:
- The number of garbage operation.
-
getGarbageTime
long getGarbageTime()
Returns the cumulated time of garbage operations.- Returns:
- The cumulated time of garbage operations.
-
getGarbageRatio
int getGarbageRatio()
Returns the ratio of garbage operations since starting up.- Returns:
- The ratio of garbage operations since starting up.
-
getGarbageDelay
int getGarbageDelay()
Returns the maximum time between two garbages, 0 if disable.- Returns:
- The maximum time between two garbages (seconds).
-
setGarbageDelay
void setGarbageDelay(int timeout)
Sets the maximum time between two garbages, 0 to disable the asynchronous garbage mechanism.- Parameters:
timeout- The maximum time between two garbages (seconds).
-
isGarbageRunning
boolean isGarbageRunning()
Returns the status of the garbage thread.- Returns:
- The status of the garbage thread.
-
garbageAsync
void garbageAsync(boolean async)
Sets asynchronous garbage.- Parameters:
async- If true activates the asynchronous garbage, deasctivates otherwise.
-
garbage
void garbage()
Garbage the log file.
-
getRepositoryImpl
String getRepositoryImpl()
-
getNbSavedObjects
int getNbSavedObjects()
Returns the number of save operation to repository.- Returns:
- The number of save operation to repository.
-
getNbDeletedObjects
int getNbDeletedObjects()
Returns the number of delete operation on repository.- Returns:
- The number of delete operation on repository.
-
getNbBadDeletedObjects
int getNbBadDeletedObjects()
Returns the number of useless delete operation on repository.- Returns:
- The number of useless delete operation on repository.
-
getNbLoadedObjects
int getNbLoadedObjects()
Returns the number of load operation from repository.- Returns:
- The number of load operation from repository.
-
-