All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.habanero.Locker
java.lang.Object
|
+----ncsa.habanero.Locker
- public class Locker
- extends Object
- implements Serializable
Locker - a limitation on a collaboration session
-
code
-
-
Locker()
-
-
Locker(Lock, KeyGen)
-
-
blocks(Action)
-
-
conflict(Lock, Key)
-
-
equals(Object)
-
-
getKey()
-
-
getLock()
-
allows the user to get the lock out
-
isOwnedBy(SessionParticipant)
-
-
onlyOnce()
-
onlyOnce
-
openedBy(Key)
-
-
use(ActionRequest)
-
-
valid()
-
code
protected Key code
Locker
public Locker(Lock desc,
KeyGen keyGenerator)
- Parameters:
- desc - - the descriptor
- keyGenerator - - the key generator
- Returns:
- Creates a Locker
Locker
public Locker()
- Returns:
- Creates a Locker - should only be used by Marshall
isOwnedBy
public boolean isOwnedBy(SessionParticipant p)
getLock
public Lock getLock()
- allows the user to get the lock out
- Returns:
- the lock associated with this locker
equals
public boolean equals(Object another)
- Parameters:
- ldAnother - - a lock descriptor
- Returns:
- compares the lock descriptor, and returns true if they are the same
- Overrides:
- equals in class Object
valid
public boolean valid()
- Returns:
- returns true if the lock is still valid
onlyOnce
public boolean onlyOnce()
- onlyOnce
- Returns:
- returns true if this lock can only be used once,
a lock derived from this class has no limit
to the number of times it can be used.
use
public boolean use(ActionRequest req)
- Returns:
- uses the Locker
conflict
public boolean conflict(Lock ldRequest,
Key oldKey)
- Parameters:
- ldRequest - - the key descriptor
- oldKey - - the old key which gives us permission to
get the request
- Returns:
- returns true if the old Locker and the lock descriptor
would be allowing people do to things that they
weren't supposed to
blocks
public boolean blocks(Action act)
- Parameters:
- act - the action that is being attempted without a lock
- Returns:
- returns true if the action is not allowed by the lock,
our assumption is that a lock doesn't block anything
unless you say it does
getKey
public Key getKey()
- Returns:
- returns the key
openedBy
public boolean openedBy(Key key)
- Parameters:
- key - - a key
- Returns:
- returns true if the key opens the Locker
All Packages Class Hierarchy This Package Previous Next Index