net.sf.webdav
Class ResourceLocks

java.lang.Object
  extended bynet.sf.webdav.ResourceLocks

public class ResourceLocks
extends java.lang.Object

some very simple locking management for concurrent data access, NOT the webdav locking. ( could that be used instead? )

Author:
re

Constructor Summary
protected ResourceLocks()
           
 
Method Summary
protected  boolean lock(java.lang.String path, java.lang.String owner, boolean exclusive, int depth)
          trys to lock the resource at "path".
protected  void unlock(java.lang.String path, java.lang.String owner)
          unlocks all resources at "path" (and all subfolders if existing)

that have the same owner

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceLocks

protected ResourceLocks()
Method Detail

lock

protected boolean lock(java.lang.String path,
                       java.lang.String owner,
                       boolean exclusive,
                       int depth)
trys to lock the resource at "path".

Parameters:
path - what resource to lock
owner - the owner of the lock
exclusive - if the lock should be exclusive (or shared)
Returns:
true if the resource at path was successfully locked, false if an existing lock prevented this

unlock

protected void unlock(java.lang.String path,
                      java.lang.String owner)
unlocks all resources at "path" (and all subfolders if existing)

that have the same owner

Parameters:
path - what resource to unlock
owner - who wants to unlock


Copyright 2006-2006 media-style. All Rights Reserved.