|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.util.AbstractTransaction
fr.dyade.aaa.util.ATransaction
public final class ATransaction
Nested Class Summary |
---|
Nested classes/interfaces inherited from class fr.dyade.aaa.util.AbstractTransaction |
---|
AbstractTransaction.Context |
Field Summary | |
---|---|
protected java.io.FileDescriptor |
logFD
|
protected java.io.RandomAccessFile |
logFile
|
protected java.io.File |
logFilePN
|
protected java.io.File |
plogFilePN
|
Fields inherited from class fr.dyade.aaa.util.AbstractTransaction |
---|
dir, logmon, OOS_STREAM_HEADER, perThreadContext, phase, startTime |
Fields inherited from interface fr.dyade.aaa.util.Transaction |
---|
COMMIT, FINALIZE, FREE, GARBAGE, INIT, Kb, Mb, PhaseInfo, ROLLBACK, RUN |
Constructor Summary | |
---|---|
ATransaction()
|
Method Summary | |
---|---|
void |
_stop()
|
void |
close()
Close the transaction module. |
void |
commit(boolean release)
Commit the current transaction. |
void |
delete(java.lang.String dirName,
java.lang.String name)
Deletes the specified object. |
java.io.File |
getDir()
|
java.lang.String[] |
getList(java.lang.String prefix)
Returns an array of strings naming the objects in the component started by this prefix. |
void |
initRepository()
|
boolean |
isPersistent()
Tests if the Transaction component is persistent. |
byte[] |
loadByteArray(java.lang.String dirName,
java.lang.String name)
Load the specified byte array. |
protected void |
newLogFile()
|
void |
release()
Release the mutual exclusion. |
void |
rollback()
|
void |
run()
|
protected void |
saveInLog(byte[] buf,
java.lang.String dirName,
java.lang.String name,
java.util.Hashtable log,
boolean copy,
boolean first)
Register the specified object in transaction log. |
protected void |
setPhase(int newPhase)
Changes the transaction state. |
void |
stop()
Stops the transaction module. |
protected void |
syncLogFile()
|
Methods inherited from class fr.dyade.aaa.util.AbstractTransaction |
---|
begin, create, create, createByteArray, createByteArray, delete, getPhase, getPhaseInfo, getStartTime, init, load, load, loadByteArray, save, save, save, saveByteArray, saveByteArray, saveByteArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.dyade.aaa.util.TransactionMBean |
---|
getPhase, getPhaseInfo, getStartTime |
Field Detail |
---|
protected java.io.File logFilePN
protected java.io.File plogFilePN
protected java.io.RandomAccessFile logFile
protected java.io.FileDescriptor logFD
Constructor Detail |
---|
public ATransaction()
Method Detail |
---|
public boolean isPersistent()
TransactionMBean
isPersistent
in interface Transaction
isPersistent
in interface TransactionMBean
public final void initRepository() throws java.io.IOException
initRepository
in class AbstractTransaction
java.io.IOException
public final java.io.File getDir()
protected final void setPhase(int newPhase)
AbstractTransaction
setPhase
in class AbstractTransaction
newPhase
- the new transaction state.public final java.lang.String[] getList(java.lang.String prefix)
Transaction
getList
in interface Transaction
protected final void saveInLog(byte[] buf, java.lang.String dirName, java.lang.String name, java.util.Hashtable log, boolean copy, boolean first) throws java.io.IOException
AbstractTransaction
saveInLog
in class AbstractTransaction
buf
- the byte array containing the state of the object.dirName
- the directory name of the object.name
- the name of the object.log
- the log to use.copy
- the byte array can be modified, copy it.first
- the object is a new one.
java.io.IOException
public final byte[] loadByteArray(java.lang.String dirName, java.lang.String name) throws java.io.IOException
Transaction
loadByteArray
in interface Transaction
dirName
- the directory name of the object.name
- the name of the object.
java.io.IOException
public final void delete(java.lang.String dirName, java.lang.String name)
Transaction
delete
in interface Transaction
dirName
- the directory name of the object.name
- the name of the object.public void commit(boolean release) throws java.io.IOException
Transaction
commit
in interface Transaction
release
- if true releases the transaction at the end of the commit.
java.io.IOException
protected void newLogFile() throws java.io.IOException
java.io.IOException
protected void syncLogFile() throws java.io.IOException
java.io.IOException
public final void rollback()
public final void release() throws java.io.IOException
AbstractTransaction
release
in interface Transaction
release
in class AbstractTransaction
java.io.IOException
Transaction.release()
public final void _stop()
public final void stop()
Transaction
stop
in interface Transaction
public void close()
close
in interface Transaction
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |