|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.util.NullTransaction
public final class NullTransaction
Field Summary | |
---|---|
protected int |
phase
|
protected long |
startTime
|
Fields inherited from interface fr.dyade.aaa.util.Transaction |
---|
COMMIT, FINALIZE, FREE, GARBAGE, INIT, Kb, Mb, PhaseInfo, ROLLBACK, RUN |
Constructor Summary | |
---|---|
NullTransaction()
|
Method Summary | |
---|---|
void |
begin()
Start a transaction validation, the validation phase needs 3 phases: begin, commit and release. |
void |
close()
Close the transaction module. |
void |
commit(boolean release)
Commit the current transaction. |
void |
create(java.io.Serializable obj,
java.lang.String name)
Register the state of a newly created object in the current transaction. |
void |
create(java.io.Serializable obj,
java.lang.String dirName,
java.lang.String name)
Register the state of a newly created object in the current transaction. |
void |
createByteArray(byte[] buf,
java.lang.String name)
Register a new byte array in the current transaction. |
void |
createByteArray(byte[] buf,
java.lang.String dirName,
java.lang.String name)
Register a new byte array in the current transaction. |
void |
delete(java.lang.String name)
Deletes the specified object. |
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. |
java.lang.String |
getPersistenceDir()
Returns the path of persistence directory. |
int |
getPhase()
Returns the transaction state. |
java.lang.String |
getPhaseInfo()
Returns a string representation of the transaction state. |
long |
getStartTime()
Returns the starting time. |
void |
init(java.lang.String path)
Initializes the atomic storage component. |
boolean |
isPersistent()
Tests if the Transaction component is persistent. |
java.lang.Object |
load(java.lang.String name)
Load the specified object. |
java.lang.Object |
load(java.lang.String dirName,
java.lang.String name)
Load the specified object. |
byte[] |
loadByteArray(java.lang.String name)
Load the specified byte array. |
byte[] |
loadByteArray(java.lang.String dirName,
java.lang.String name)
Load the specified byte array. |
void |
release()
Release the mutual exclusion. |
void |
save(java.io.Serializable obj,
java.lang.String name)
Register the modified state of an object in the current transaction. |
void |
save(java.io.Serializable obj,
java.lang.String dirName,
java.lang.String name)
Register the modified state of an object in the current transaction. |
void |
save(java.io.Serializable obj,
java.lang.String dirName,
java.lang.String name,
boolean first)
Register the state of an object in the current transaction. |
void |
saveByteArray(byte[] buf,
java.lang.String name)
Register a modified byte array in the current transaction. |
void |
saveByteArray(byte[] buf,
java.lang.String dirName,
java.lang.String name)
Register a modified byte array in the current transaction. |
void |
saveByteArray(byte[] buf,
java.lang.String dirName,
java.lang.String name,
boolean copy,
boolean first)
Register a modified byte array in the current transaction. |
protected void |
setPhase(int newPhase)
|
void |
stop()
Stops the transaction module. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long startTime
protected int phase
Constructor Detail |
---|
public NullTransaction()
Method Detail |
---|
public long getStartTime()
getStartTime
in interface TransactionMBean
public final int getPhase()
Transaction
getPhase
in interface Transaction
getPhase
in interface TransactionMBean
public final java.lang.String getPhaseInfo()
Transaction
getPhaseInfo
in interface Transaction
getPhaseInfo
in interface TransactionMBean
protected final void setPhase(int newPhase)
public boolean isPersistent()
isPersistent
in interface Transaction
isPersistent
in interface TransactionMBean
public void init(java.lang.String path) throws java.io.IOException
Transaction
init
in interface Transaction
java.io.IOException
public java.io.File getDir()
public java.lang.String getPersistenceDir()
public final void begin() throws java.io.IOException
Transaction
begin
in interface Transaction
java.io.IOException
public java.lang.String[] getList(java.lang.String prefix)
Transaction
getList
in interface Transaction
public final void create(java.io.Serializable obj, java.lang.String name) throws java.io.IOException
Transaction
create
in interface Transaction
obj
- the object to store.name
- the name of the object.
java.io.IOException
public final void create(java.io.Serializable obj, java.lang.String dirName, java.lang.String name) throws java.io.IOException
Transaction
create
in interface Transaction
obj
- the object to store.dirName
- the directory name of the object.name
- the name of the object.
java.io.IOException
public final void save(java.io.Serializable obj, java.lang.String name) throws java.io.IOException
Transaction
save
in interface Transaction
obj
- the object to store.name
- the name of the object.
java.io.IOException
public final void save(java.io.Serializable obj, java.lang.String dirName, java.lang.String name) throws java.io.IOException
Transaction
save
in interface Transaction
obj
- the object to store.dirName
- the directory name of the object.name
- the name of the object.
java.io.IOException
public void save(java.io.Serializable obj, java.lang.String dirName, java.lang.String name, boolean first) throws java.io.IOException
Transaction
save
in interface Transaction
obj
- the object to store.dirName
- the directory name of the object.name
- the name of the object.first
- the object is a new one.
java.io.IOException
public final void createByteArray(byte[] buf, java.lang.String name) throws java.io.IOException
Transaction
createByteArray
in interface Transaction
buf
- the byte array to store.name
- the name of the object.
java.io.IOException
public final void createByteArray(byte[] buf, java.lang.String dirName, java.lang.String name) throws java.io.IOException
Transaction
createByteArray
in interface Transaction
buf
- the byte array to store.dirName
- the directory name of the object.name
- the name of the object.
java.io.IOException
public final void saveByteArray(byte[] buf, java.lang.String name) throws java.io.IOException
Transaction
saveByteArray
in interface Transaction
buf
- the byte array to store.name
- the name of the object.
java.io.IOException
public final void saveByteArray(byte[] buf, java.lang.String dirName, java.lang.String name) throws java.io.IOException
Transaction
saveByteArray
in interface Transaction
buf
- the byte array to store.dirName
- the directory name of the object.name
- the name of the object.
java.io.IOException
public void saveByteArray(byte[] buf, java.lang.String dirName, java.lang.String name, boolean copy, boolean first) throws java.io.IOException
Transaction
saveByteArray
in interface Transaction
buf
- the byte array to store.dirName
- the directory name of the object.name
- the name of the object.copy
- the byte array can be modified, copy it.first
- the object is a new one.
java.io.IOException
public final java.lang.Object load(java.lang.String name) throws java.io.IOException, java.lang.ClassNotFoundException
Transaction
load
in interface Transaction
name
- the name of the object.
java.io.IOException
java.lang.ClassNotFoundException
public final java.lang.Object load(java.lang.String dirName, java.lang.String name) throws java.io.IOException, java.lang.ClassNotFoundException
Transaction
load
in interface Transaction
dirName
- the directory name of the object.name
- the name of the object.
java.io.IOException
java.lang.ClassNotFoundException
public final byte[] loadByteArray(java.lang.String name) throws java.io.IOException
Transaction
loadByteArray
in interface Transaction
name
- the name of the object.
java.io.IOException
public 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 name)
Transaction
delete
in interface Transaction
name
- the name of the object.public 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
public void release() throws java.io.IOException
Transaction
release
in interface Transaction
java.io.IOException
public final void stop()
Transaction
stop
in interface Transaction
public final void close()
Transaction
close
in interface Transaction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |