protected class Locking.ServerLock
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Locking.ServerCondition |
condition |
protected Owner |
current_owner |
protected java.lang.String |
lock_name |
protected java.util.List<Locking.Request> |
queue |
Modifier | Constructor and Description |
---|---|
|
ServerLock(java.lang.String lock_name) |
protected |
ServerLock(java.lang.String lock_name,
Owner owner) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToQueue(Locking.Request req) |
protected Locking.Request |
getNextRequest() |
protected Locking.Response |
handleRequest(Locking.Request req) |
protected Locking.Response |
handleView(java.util.List<Address> members) |
boolean |
isEmpty() |
protected boolean |
isRequestPresent(Locking.Type type,
Owner owner)
Checks if a certain request from a given owner is already in the queue
|
protected Locking.Response |
processQueue() |
protected void |
removeRequest(Locking.Type type,
Owner owner) |
protected void |
setOwner(Owner owner) |
java.lang.String |
toString() |
protected final java.lang.String lock_name
protected Owner current_owner
protected final java.util.List<Locking.Request> queue
protected final Locking.ServerCondition condition
public ServerLock(java.lang.String lock_name)
protected ServerLock(java.lang.String lock_name, Owner owner)
protected Locking.Response handleRequest(Locking.Request req)
protected Locking.Response handleView(java.util.List<Address> members)
protected void addToQueue(Locking.Request req)
protected boolean isRequestPresent(Locking.Type type, Owner owner)
protected void removeRequest(Locking.Type type, Owner owner)
protected Locking.Request getNextRequest()
protected Locking.Response processQueue()
protected void setOwner(Owner owner)
public boolean isEmpty()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1998-2020 Red Hat. All Rights Reserved.