| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectelectric.directory.Directory
electric.directory.persistent.PersistentDirectory
PersistentDirectory is an implementation of IDirectory that uses a TransactionalDictionary for its underlying storage. Operations that occur outside of a transaction are committed immediately. Operations that within a transaction are cached and can be either committed or rolled back using the GLUE transaction APIs.
| Field Summary | 
| Fields inherited from class electric.directory.Directory | 
dictionary, parent | 
| Fields inherited from interface electric.util.log.ILoggingConstants | 
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT | 
| Constructor Summary | |
PersistentDirectory(java.lang.String root)
Construct a PersistentDirectory that is associated with the specified filesystem root.  | 
|
PersistentDirectory(java.lang.String root,
                    boolean delete)
Construct a PerisistentDirectory that is associated with the specified filesystem root.  | 
|
| Method Summary | |
 void | 
delete()
Delete this directory, removing it from its parent directory.  | 
 boolean | 
getEncoded()
Return true if I use an EncodedWriter to persist objects to storage.  | 
 boolean | 
getSync()
 | 
protected  TransactionalDictionary | 
getTransactionalDictionary()
Return the underlying TransactionalDictionary.  | 
 java.lang.Object | 
loadEntry()
 | 
 IDirectory | 
newSubdirectory(java.lang.String name)
Create and return a new subdirectory with the specified name.  | 
 java.lang.Object | 
peek(java.lang.String path)
Return the object with the specified path, or null if not found.  | 
 void | 
putEntry()
Do nothing.  | 
 void | 
removedEntry()
Delete this entry by calling delete().  | 
 void | 
setEncoded(boolean encoded)
If the encoded argument is true, use an EncodedWriter to persist objects to storage, otherwise use a LiteralWriter.  | 
 void | 
setSync(boolean flag)
 | 
 java.lang.String | 
toString()
Return a description of this directory.  | 
| Methods inherited from class electric.directory.Directory | 
findAll, findFirst, get, getParent, getParts, getPath, getRoot, getSubdirectory, keys, put, remove, removeObject, setParent, size, toString | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public PersistentDirectory(java.lang.String root)
                    throws DirectoryException
root - The filesystem root.
DirectoryException
public PersistentDirectory(java.lang.String root,
                           boolean delete)
                    throws DirectoryException
root - The filesystem root.delete - If true, delete the previous contents.
DirectoryException - If an error occurred in the underlying
 TransactionalDictionary.| Method Detail | 
public java.lang.String toString()
toString in class Directory
public java.lang.Object peek(java.lang.String path)
                      throws DirectoryException
peek in interface IDirectorypeek in class Directorypath - The path.
DirectoryException - If an error occurs in the underlying directory.
public IDirectory newSubdirectory(java.lang.String name)
                           throws DirectoryException
newSubdirectory in interface IDirectorynewSubdirectory in class Directoryname - The name of the new subdirectory.
DirectoryException - If the name is invalid or the subdirectory could
 not be constructed.
public void delete()
            throws DirectoryException
delete in interface IDirectorydelete in class DirectoryDirectoryException - If the directory could not be deleted.protected TransactionalDictionary getTransactionalDictionary()
public boolean getEncoded()
public void setEncoded(boolean encoded)
encoded - The new encoded mode.public void setSync(boolean flag)
flag - public boolean getSync()
public void putEntry()
putEntry in interface IEntrypublic void removedEntry()
removedEntry in interface IEntrypublic java.lang.Object loadEntry()
loadEntry in interface IEntry
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||