|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.webdav.locking.LockedObject
public class LockedObject
a helper class for ResourceLocks, represents the Locks
| Field Summary | |
|---|---|
protected LockedObject[] |
_children
children of that lock |
protected boolean |
_exclusive
weather the lock is exclusive or not. |
protected long |
_expiresAt
Describing the timeout of a locked object (ms) |
protected int |
_lockDepth
Describing the depth of a locked collection. |
protected String[] |
_owner
owner of the lock. |
protected LockedObject |
_parent
|
protected String |
_type
weather the lock is a write or read lock |
| Constructor Summary | |
|---|---|
LockedObject(ResourceLocks resLocks,
String path,
boolean temporary)
|
|
| Method Summary | |
|---|---|
void |
addChild(LockedObject newChild)
adds a new child lock to this lock |
boolean |
addLockedObjectOwner(String owner)
adds a new owner to a lock |
boolean |
checkLocks(boolean exclusive,
int depth)
checks if a lock of the given exclusivity can be placed, only considering children up to "depth" |
String |
getID()
Gets the LockID (locktoken) for the LockedObject |
int |
getLockDepth()
Gets the depth of the lock |
String[] |
getOwner()
Gets the owners for the LockedObject |
String |
getPath()
Gets the path for the LockedObject |
long |
getTimeoutMillis()
Gets the timeout for the LockedObject |
String |
getType()
Gets the type of the lock |
boolean |
hasExpired()
Return true if the lock has expired. |
boolean |
isExclusive()
Gets the exclusivity for the LockedObject |
boolean |
isShared()
Gets the exclusivity for the LockedObject |
void |
refreshTimeout(int timeout)
Sets a new timeout for the LockedObject |
void |
removeLockedObject()
deletes this Lock object. |
void |
removeLockedObjectOwner(String owner)
tries to remove the owner from the lock |
void |
removeTempLockedObject()
deletes this Lock object. |
void |
setExclusive(boolean exclusive)
Sets the exclusivity for the LockedObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _lockDepth
protected long _expiresAt
protected String[] _owner
protected LockedObject[] _children
protected LockedObject _parent
protected boolean _exclusive
protected String _type
| Constructor Detail |
|---|
public LockedObject(ResourceLocks resLocks,
String path,
boolean temporary)
_resourceLocks - the resourceLocks where locks are storedpath - the path to the locked objecttemporary - indicates if the LockedObject should be temporary or not| Method Detail |
|---|
public boolean addLockedObjectOwner(String owner)
owner - string that represents the owner
public void removeLockedObjectOwner(String owner)
owner - string that represents the ownerpublic void addChild(LockedObject newChild)
newChild - new childpublic void removeLockedObject()
public void removeTempLockedObject()
public boolean checkLocks(boolean exclusive,
int depth)
exclusive - wheather the new lock should be exclusivedepth - the depth to which should be checked
public void refreshTimeout(int timeout)
timeout - public long getTimeoutMillis()
public boolean hasExpired()
public String getID()
public String[] getOwner()
public String getPath()
public void setExclusive(boolean exclusive)
exclusive - public boolean isExclusive()
public boolean isShared()
public String getType()
public int getLockDepth()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||