|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TreeManager
The TreeManager serves as a FileT factory. Clients obtain FileTs by requesting a FileT from the manager and by creating empty FileTs through the manager. Clients change the writability of FileTs by opening and closing TreeTransactions. For the sake of transaction consistency, a FileT belongs to exactly one TreeManager for the lifetime of the FileT.
The TreeManager owns a single lockable resource (which may be itself) which must, at the minumum, provide the functionality of a read-write lock. Each FileT is tied to a single lockable resource (which may be itself) which is defined by the owning IDE. This may be an IDE lock controlling the writable of the underlying resource. Because the FileT's lock is not defined by the owning IDE and not the owning TreeManager, it is the responsibility (or neglect) of the owning IDE to safeguard against deadlocks and starvation. Attempting to make any change to a FileT marked as read-only will result in an IllegalStateException. Attempting to mark a FileT as writable when the FileT's underlying resource is not writable may result in a RuntimeException, at the discretion of the owning IDE. Although a FileT is logically writable only on the thread that made it writable, this manager does not enforce that policy. To start a transaction, callbeginTransaction
on the
FileT in question.
Opening a new transaction that conflicts with an already open
transaction results in an IllegalStateException. This TreeManager
does not provide blocking operations on its transaction state.
Attempting to close a transaction on a thread different than than
the opening thread results in a IllegalStateException. A nested
transaction is not considered to be at conflict with its enclosing
transaction.
Method Summary | |
---|---|
void |
cloneSourceFile(FileT source,
FileT destination)
Clears the destination FileT (unlinks all its children), clones the source FileT contents, and links the cloned Trees into the destination FileT. |
FileT |
createSourceFile(java.net.URI sourceURI)
Creates a new FileT for the given Java source URI (*.java). |
FileT |
getAnonymousFile()
Fetches an anonymous file. |
FileT |
getSourceFile(java.net.URI sourceURI)
Fetches the FileT for at the given URI (usually of the form *.java). |
Method Detail |
---|
FileT getSourceFile(java.net.URI sourceURI)
sourceURI
- The target URI.
java.lang.IllegalArgumentException
- if the URI is not recognized as
a Java source file.FileT createSourceFile(java.net.URI sourceURI) throws java.io.IOException
sourceURI
- The target URI.
java.io.IOException
- if the new file cannot be created.
java.lang.IllegalArgumentException
- if the URI is not recognized as
a Java source file.FileT getAnonymousFile()
void cloneSourceFile(FileT source, FileT destination)
source
- The source FileT.destination
- The destination FileT.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |