|
|||||||||
| Home >> All >> javax >> ide >> [ model overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.ide.model
Interface Transaction

- public interface Transaction
| Method Summary | |
void |
beginEdit()
Used to instruct a model to start a compound edit such that all the changes made between this point and when the endEdit() is called should be combined into a single
UndoableEdit record. |
javax.swing.undo.UndoableEdit |
commitEdit()
Used to indicate to the text buffer to end an in progress compound edit. |
void |
read(java.lang.Runnable runnable)
This allows the model to be safely read. |
void |
rollbackEdit()
Used to indicate to the text buffer to end an in progress compound edit without commiting the changes. |
void |
write(java.lang.Runnable runnable)
This allows the model to be safely updated. |
| Method Detail |
beginEdit
public void beginEdit()
throws java.io.IOException
- Used to instruct a model to start a compound edit
such that all the changes made between this point and when the
endEdit()is called should be combined into a single UndoableEdit record. This guarantees to the client that the buffer will be locked for the duration betweenbeginEdit()andendEdit()for data consistency. This also takes care of locking the buffer, and collecting the individualUndoableEditobjects into a larger compound one.Note that compound edits may not be nested - it is illegal to call
beginEdit()twice in a row without callingendEdit()in between.
commitEdit
public javax.swing.undo.UndoableEdit commitEdit()
- Used to indicate to the text buffer to end an in progress
compound edit. This will end the compound edit and returned the
single combined
UndoableEditrepresenting all of the changes made between the calls tobeginEdit()andendEdit(). If no modifications were made to the buffer sincebeginEdit()was called, null will be returned.
rollbackEdit
public void rollbackEdit()
- Used to indicate to the text buffer to end an in progress
compound edit without commiting the changes. The text buffer
will be left in the same state it was found when the call to
beginEditwas made.
read
public void read(java.lang.Runnable runnable)
- This allows the model to be safely read. The given runnable
will be executed in a way that allows it to safely read to the model
(with no changes from other threads) while the runnable is being executed.
Multiple read calls from the same thread are allowed.
write
public void write(java.lang.Runnable runnable)
- This allows the model to be safely updated. The given runnable
will be executed in a way that allows it to safely write to the model
(with no changes from other threads) while the runnable is being executed.
Multiple write calls from the same thread are allowed.
|
|||||||||
| Home >> All >> javax >> ide >> [ model overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC