org.rundeck.storage.data.file
Class LockingTree<T extends ContentMeta>

java.lang.Object
  extended by org.rundeck.storage.impl.StringToPathTree<T>
      extended by org.rundeck.storage.data.file.LockingTree<T>
All Implemented Interfaces:
Tree<T>
Direct Known Subclasses:
FileTree

public abstract class LockingTree<T extends ContentMeta>
extends StringToPathTree<T>
implements Tree<T>

LockingTree provides lock objects which can be synchronized for resource access to a particular path.

Since:
2014-03-28

Constructor Summary
LockingTree()
           
 
Method Summary
protected  java.lang.Object pathSynch(Path path)
          Return an object that can be synchronized on for the given path.
protected  HasInputStream synchStream(Path path, HasInputStream stream)
          Return a HasInputStream where all read access to the underlying data is synchronized around the path
 
Methods inherited from class org.rundeck.storage.impl.StringToPathTree
createResource, deleteResource, getPath, getResource, hasDirectory, hasPath, hasResource, listDirectory, listDirectoryResources, listDirectorySubdirs, updateResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rundeck.storage.api.Tree
createResource, createResource, deleteResource, deleteResource, getPath, getPath, getResource, getResource, hasDirectory, hasDirectory, hasPath, hasPath, hasResource, hasResource, listDirectory, listDirectory, listDirectoryResources, listDirectoryResources, listDirectorySubdirs, listDirectorySubdirs, updateResource, updateResource
 

Constructor Detail

LockingTree

public LockingTree()
Method Detail

pathSynch

protected java.lang.Object pathSynch(Path path)
Return an object that can be synchronized on for the given path.

Parameters:
path -
Returns:

synchStream

protected HasInputStream synchStream(Path path,
                                     HasInputStream stream)
Return a HasInputStream where all read access to the underlying data is synchronized around the path

Parameters:
path -
stream -
Returns: