public abstract class Locking extends Protocol
LockService
is placed on a channel. LockService talks to a subclass of Locking
via events.CENTRAL_LOCK
,
PEER_LOCK
Modifier and Type | Class and Description |
---|---|
protected class |
Locking.ClientCondition |
protected class |
Locking.ClientLock |
static class |
Locking.LockingHeader |
protected static class |
Locking.Request |
protected class |
Locking.ServerCondition |
protected class |
Locking.ServerLock
Server side queue for handling of lock requests (lock, release).
|
protected static class |
Locking.Type |
Modifier and Type | Field and Description |
---|---|
protected boolean |
bypass_bundling |
protected Map<String,Map<Owner,Locking.ClientLock>> |
client_locks |
protected Address |
local_addr |
protected Set<LockNotification> |
lock_listeners |
protected ConcurrentMap<String,Locking.ServerLock> |
server_locks |
protected View |
view |
Constructor and Description |
---|
Locking() |
Modifier and Type | Method and Description |
---|---|
void |
addLockListener(LockNotification listener) |
protected Locking.ClientLock |
createLock(String lock_name) |
Object |
down(Event evt)
An event is to be sent down the stack.
|
String |
getAddress() |
boolean |
getBypassBundling() |
protected Locking.ClientLock |
getLock(String name) |
protected Locking.ClientLock |
getLock(String name,
boolean create_if_absent) |
protected Locking.ClientLock |
getLock(String name,
Owner owner,
boolean create_if_absent) |
protected Owner |
getOwner() |
String |
getView() |
protected void |
handleAwaitRequest(String lock_name,
Owner owner) |
protected void |
handleCreateAwaitingRequest(String lock_name,
Owner owner) |
protected void |
handleCreateLockRequest(String lock_name,
Owner owner) |
protected void |
handleDeleteAwaitingRequest(String lock_name,
Owner owner) |
protected void |
handleDeleteAwaitRequest(String lock_name,
Owner owner) |
protected void |
handleDeleteLockRequest(String lock_name) |
protected void |
handleLockDeniedResponse(String lock_name,
Owner owner) |
protected void |
handleLockGrantedResponse(String lock_name,
Owner owner,
Address sender) |
protected void |
handleLockRequest(Locking.Request req) |
protected void |
handleSignalRequest(Locking.Request req) |
protected void |
handleSignalResponse(String lock_name,
Owner owner) |
protected void |
handleView(View view) |
protected void |
notifyAwaited(String lock_name,
Owner owner) |
protected void |
notifyAwaiting(String lock_name,
Owner owner) |
protected void |
notifyLockCreated(String lock_name) |
protected void |
notifyLockDeleted(String lock_name) |
protected void |
notifyLocked(String lock_name,
Owner owner) |
protected void |
notifyUnlocked(String lock_name,
Owner owner) |
String |
printLocks() |
protected void |
removeClientLock(String lock_name,
Owner owner) |
void |
removeLockListener(LockNotification listener) |
protected abstract void |
sendAwaitConditionRequest(String lock_name,
Owner owner) |
protected abstract void |
sendDeleteAwaitConditionRequest(String lock_name,
Owner owner) |
protected abstract void |
sendGrantLockRequest(String lock_name,
Owner owner,
long timeout,
boolean is_trylock) |
protected void |
sendLockResponse(Locking.Type type,
Owner dest,
String lock_name) |
protected abstract void |
sendReleaseLockRequest(String lock_name,
Owner owner) |
protected void |
sendRequest(Address dest,
Locking.Type type,
String lock_name,
Owner owner,
long timeout,
boolean is_trylock) |
protected abstract void |
sendSignalConditionRequest(String lock_name,
boolean all) |
protected void |
sendSignalResponse(Owner dest,
String lock_name) |
void |
setBypassBundling(boolean bypass_bundling) |
void |
unlockAll() |
Object |
up(Event evt)
An event was received from the layer below.
|
destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, init, isErgonomics, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStatistics, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, start, statsEnabled, stop
protected boolean bypass_bundling
protected Address local_addr
protected View view
protected final ConcurrentMap<String,Locking.ServerLock> server_locks
protected final Map<String,Map<Owner,Locking.ClientLock>> client_locks
protected final Set<LockNotification> lock_listeners
public boolean getBypassBundling()
public void setBypassBundling(boolean bypass_bundling)
public void addLockListener(LockNotification listener)
public void removeLockListener(LockNotification listener)
public String getAddress()
public String getView()
public Object down(Event evt)
Protocol
down_prot.down()
. In case of a GET_ADDRESS event (which tries to
retrieve the stack's address from one of the bottom layers), the layer may need to send
a new response event back up the stack using up_prot.up()
.public Object up(Event evt)
Protocol
down_prot.down()
or c) the event (or another event) is sent up
the stack using up_prot.up()
.protected Locking.ClientLock getLock(String name)
protected Locking.ClientLock getLock(String name, boolean create_if_absent)
public void unlockAll()
public String printLocks()
protected void handleView(View view)
protected Locking.ClientLock createLock(String lock_name)
protected Owner getOwner()
protected abstract void sendGrantLockRequest(String lock_name, Owner owner, long timeout, boolean is_trylock)
protected abstract void sendReleaseLockRequest(String lock_name, Owner owner)
protected abstract void sendAwaitConditionRequest(String lock_name, Owner owner)
protected abstract void sendSignalConditionRequest(String lock_name, boolean all)
protected abstract void sendDeleteAwaitConditionRequest(String lock_name, Owner owner)
protected void sendRequest(Address dest, Locking.Type type, String lock_name, Owner owner, long timeout, boolean is_trylock)
protected void sendLockResponse(Locking.Type type, Owner dest, String lock_name)
protected void handleLockRequest(Locking.Request req)
protected void handleLockGrantedResponse(String lock_name, Owner owner, Address sender)
protected void handleSignalRequest(Locking.Request req)
protected void handleDeleteLockRequest(String lock_name)
protected void handleCreateAwaitingRequest(String lock_name, Owner owner)
protected void handleDeleteAwaitingRequest(String lock_name, Owner owner)
protected Locking.ClientLock getLock(String name, Owner owner, boolean create_if_absent)
protected void notifyLockCreated(String lock_name)
protected void notifyLockDeleted(String lock_name)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.