|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.mdl.util.TransStringSet
This class technically is a set of Strings with the expanded capability to rollback changes made since particular points in the past. Therefore the name 'transactional string set'. Basically, the states to which the state may be rollbacked are construction and the last calls to commit or rollback.
| Constructor Summary | |
TransStringSet()
|
|
| Method Summary | |
abstract boolean |
add(java.lang.String key)
Adds a given key to the selection set. |
abstract boolean |
changed()
Returns true if this selection set has changed since construction or the last call to commit or rollback. |
abstract void |
clear()
Removes all entries from this. |
abstract void |
commit()
Discards the history information. |
abstract boolean |
contains(java.lang.String key)
Returns true if this set contains the provided key |
abstract void |
describe(DNode node)
describe puts all relevant information about this into the provided node. |
abstract int |
estimateMemory()
Estimates the number of bytes this object consumes in memory. |
abstract void |
externalize(XmaOutput xo,
boolean forceFull)
Externalizing either saves the actual state or deltas (changes) in a provided XMAObjectOutput. |
abstract java.lang.String[] |
getAll()
Returns a newly allocated String[] containing all Strings in this set. |
abstract java.lang.String |
getSome()
Returns some String in this set or null if size() == 0. |
abstract void |
internalize(XmaInput in)
Updates the state of this with information of the given XMAObjectInput. |
abstract boolean |
remove(java.lang.String key)
Removes a given key from the selection set |
abstract void |
rollback()
Restores the state of this to the state of the last commit, rollback or construction. |
abstract int |
size()
Returns the number of strings in the set. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TransStringSet()
| Method Detail |
public abstract void commit()
commit in interface Transactionalpublic abstract void rollback()
rollback in interface Transactionalpublic abstract boolean changed()
changed in interface Transactionalpublic abstract boolean add(java.lang.String key)
key - the key to add; must not be null.
java.lang.IllegalArgumentException - if key is null.public abstract boolean remove(java.lang.String key)
key - the key to remove
java.lang.IllegalArgumentException - if key is null.public abstract void clear()
public abstract int size()
public abstract java.lang.String getSome()
public abstract java.lang.String[] getAll()
public abstract boolean contains(java.lang.String key)
public abstract int estimateMemory()
public abstract void externalize(XmaOutput xo,
boolean forceFull)
throws java.io.IOException
SynchronizationIf forceFull is false, the object implementing this interface must also implement Transactional. If the object implementing this is able to track changes, these are the changes since the last syncpoint.
externalize in interface Synchronizationxo - the serialization destinationforceFull - if true, the complete state is written
and deltas are ignored.
java.io.IOException - on serialization errorsSynchronization.externalize(at.spardat.xma.serializer.XmaOutput, boolean)
public abstract void internalize(XmaInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
SynchronizationThis method is not allowed to throw Exceptions because that would leave models in an inconsistent state. Thrown exceptions are considered to be programming errors. Internalize must not throw technical exceptions which indicate system or ressource failures. That implies that the person implementing internalize is not allowed to access ressources outside the JVM, either directly or via calls to other methods. Examples of ressource access which must not be triggered are calls to communication of file system services.
internalize in interface Synchronizationin - the XMAObjectInput. If a XMAObjectInputChangeListener is
set in the object in, it will be notified after applying
changes read from in.
java.lang.ClassNotFoundException - on serialization errors
java.io.IOException - on serialization errorsSynchronization.internalize(at.spardat.xma.serializer.XmaInput)public abstract void describe(DNode node)
Descriptive
describe in interface Descriptivenode - the node going to hold information about this.Descriptive.describe(at.spardat.xma.mdl.util.DNode)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||