public interface Storage
| Modifier and Type | Method and Description | 
|---|---|
void | 
allowOpen()
Allows the storage to be opened again. 
 | 
void | 
close()
Close the storage. 
 | 
void | 
deleteNameSpace(java.lang.String name)
Delete a namespace from this storage. 
 | 
void | 
deleteNameSpace(java.lang.String name,
               java.util.Collection<java.lang.String> secondaryKeys)
Delete a namespace from this storage, as well as any data for secondary
 keys associated with this namespace. 
 | 
NameSpace | 
getNameSpace(java.lang.String name)
Get a namespace from this storage. 
 | 
NameSpace | 
getNameSpace(java.lang.String name,
            int type)
Get a namespace from this storage. 
 | 
NameSpace | 
getNameSpace(java.lang.String name,
            SecondaryKeyProvider provider)
Get a namespace from this storage. 
 | 
java.lang.String | 
getRelativePath(java.net.URL url)
Get a path relative to this storage. 
 | 
java.net.URL | 
getURL(java.lang.String relativePath)
Get the URL for a relative path in the storage. 
 | 
boolean | 
isOpen()
Determine whether this storage is open. 
 | 
boolean | 
isPinned()
Determine whether this storage is pinned open. 
 | 
void | 
lockClosed()
Locks this storage closed. 
 | 
void | 
open()
Open the storage. 
 | 
void | 
pin()
Pins the storage open for faster access. 
 | 
<T> T | 
runWhileClosed(java.util.concurrent.Callable<T> c)
Run a task while the storage is closed. 
 | 
void | 
runWhileClosed(java.lang.Runnable r)
Run a task while the storage is closed. 
 | 
<T> T | 
runWhileOpen(java.util.concurrent.Callable<T> c)
Runs a task while the storage is open. 
 | 
void | 
runWhileOpen(java.lang.Runnable r)
Runs a task while the storage is open. 
 | 
void | 
unpin()
Unpins the storage. 
 | 
java.lang.String getRelativePath(@NotNull
                               java.net.URL url)
url - the URL to make relativejava.lang.IllegalStateException - if the storage is not opengetURL(String)java.net.URL getURL(@NotNull
                  java.lang.String relativePath)
relativePath - the relative pathjava.lang.IllegalStateException - if the storage is not opengetRelativePath(URL)NameSpace getNameSpace(@NotNull java.lang.String name)
name - the name of the namespacejava.lang.IllegalStateException - if the storage is not openNameSpace getNameSpace(@NotNull java.lang.String name, int type)
name - the name of the namespacetype - the type of namespace, either NameSpace.NSTYPE_NORMAL
   or NameSpace.NSTYPE_PACKEDjava.lang.IllegalStateException - if the storage is not openNameSpace getNameSpace(@NotNull java.lang.String name, @NotNull SecondaryKeyProvider provider)
name - the name of the namespaceprovider - the secondary key provider for the namespacejava.lang.IllegalStateException - if the storage is not openvoid deleteNameSpace(@NotNull
                   java.lang.String name)
name - the name of the namespacejava.lang.IllegalStateException - if the storage is not openvoid deleteNameSpace(@NotNull
                   java.lang.String name,
                   @NotNull
                   java.util.Collection<java.lang.String> secondaryKeys)
name - the name of the namespacesecondaryKeys - secondary keys associated with this namespacejava.lang.IllegalStateException - if the storage is not openboolean isOpen()
true if the storage is open, false otherwisevoid open()
close().  It is strongly recommended that
 runWhileOpen(Runnable) or runWhileOpen(Callable) be used
 instead of this method.close(), 
runWhileOpen(Runnable), 
runWhileOpen(Callable)void close()
open().  It is strongly recommended that
 runWhileOpen(Runnable) or runWhileOpen(Callable) be used
 instead of this method.open(), 
runWhileOpen(Runnable), 
runWhileOpen(Callable)void runWhileOpen(@NotNull
                java.lang.Runnable r)
r - the task to run<T> T runWhileOpen(@NotNull
                 java.util.concurrent.Callable<T> c)
               throws java.lang.Exception
T - the type of value returned by the taskc - the task to runjava.lang.Exception - if the task throws an exceptionvoid lockClosed()
allowOpen() is
 called.
 
 Great care must be taken when calling this method to avoid deadlock.  This
 method should never be called while holding onto any other locks, such as
 Node locks.  Doing so would cause deadlock with other threads that use the
 storage.
 
 The calling thread must not call anything that requires the storage in
 between the calls to lockClosed and allowOpen.  Doing so
 would cause deadlock.
 
 The caller must ensure that for every call to this method, there is a
 corresponding call to allowOpen().  Failure to do so would result
 in the storage being locked permanently, blocking all future operations
 that need to use it.  Typically, a caller should use a try/finally
 block to make sure that allowOpen() is always called.
This method is useful for situations where the storage file must be deleted or replaced while JDeveloper is running.
 
 It is strongly recommended that runWhileClosed(Runnable) or
 runWhileClosed(Callable) be used instead of this method.
void allowOpen()
lockClosed().
 
 It is strongly recommended that runWhileClosed(Runnable) or
 runWhileClosed(Callable) be used instead of this method.
void runWhileClosed(@NotNull
                  java.lang.Runnable r)
r - the task to run<T> T runWhileClosed(@NotNull
                   java.util.concurrent.Callable<T> c)
                 throws java.lang.Exception
T - the type of value returned by the taskc - the task to runjava.lang.Exception - if the task throws an exceptionvoid pin()
unpin().  This is an optional
 operation.  That is, the implementation may or may not support pinning,
 and the call may be ignored.void unpin()
boolean isPinned()
true if the storage is pinned open, false otherwise