net.sf.webdav
Class ResourceLocks
java.lang.Object
net.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
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 |
ResourceLocks
protected ResourceLocks()
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 lockowner
- the owner of the lockexclusive
- 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 unlockowner
- who wants to unlock
Copyright 2006-2006 media-style. All Rights Reserved.