org.eclipse.rse.core.model
Class RSEModelOperation
java.lang.Object
org.eclipse.rse.core.model.RSEModelOperation
-
public abstract class RSEModelOperation
- extends
Object
Provides a transaction boundary for RSE model operations. All operations that
modify model objects should be done within an RSEModelOperation. These operations
may be nested. Changes made to the model will be persisted when the outermost
operation of a particular thread is exited.
The usage idiom is to create an anonymous subclass of this class just prior to
use, overriding the
execute()
method, and then invoke the
run()
method.
RSEModelOperation m = new RSEModelOperation() {
public void execute() {
... do work here ...
}
};
m.run();
under development - provisional
-
Since:
- RSE 2.0
Constructor Summary
|
RSEModelOperation
()
Create a new operation scoped to the current thread. |
Method Summary
|
static void
|
check
()
Checks the current thread to see if there is a model transaction in progress. |
abstract void
|
execute
()
Perform the work of this operation. |
void
|
run
()
Runs this operation. |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
RSEModelOperation
public RSEModelOperation()
- Create a new operation scoped to the current thread.
check
public static void check()
- Checks the current thread to see if there is a model transaction in progress.
Should be used inside model objects prior to a change to a persistent property.
-
execute
public abstract void execute()
- Perform the work of this operation. This is where the work of modifying several model
properties or objects can be done.
-
run
public void run()
- Runs this operation. This will cause the
execute()
method to be invoked inside
a transaction boundary.
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.