public class LockServiceDemo extends java.lang.Object implements LockNotification
限定符和类型 | 字段和说明 |
---|---|
protected JChannel |
ch |
protected LockService |
lock_service |
protected java.lang.String |
name |
protected java.lang.String |
props |
构造器和说明 |
---|
LockServiceDemo(java.lang.String props,
java.lang.String name) |
限定符和类型 | 方法和说明 |
---|---|
void |
awaited(java.lang.String lock_name,
Owner owner) |
void |
awaiting(java.lang.String lock_name,
Owner owner) |
protected static void |
help() |
void |
lockCreated(java.lang.String name) |
void |
lockDeleted(java.lang.String name) |
void |
locked(java.lang.String lock_name,
Owner owner) |
protected void |
loop() |
static void |
main(java.lang.String[] args) |
protected static java.util.List<java.lang.String> |
parseLockNames(java.lang.String line) |
protected void |
printLocks() |
void |
start() |
void |
start(JChannel ch) |
void |
unlocked(java.lang.String lock_name,
Owner owner) |
protected java.lang.String props
protected JChannel ch
protected LockService lock_service
protected java.lang.String name
public void start() throws java.lang.Exception
java.lang.Exception
public void start(JChannel ch) throws java.lang.Exception
java.lang.Exception
public void lockCreated(java.lang.String name)
lockCreated
在接口中 LockNotification
public void lockDeleted(java.lang.String name)
lockDeleted
在接口中 LockNotification
public void locked(java.lang.String lock_name, Owner owner)
locked
在接口中 LockNotification
public void unlocked(java.lang.String lock_name, Owner owner)
unlocked
在接口中 LockNotification
public void awaiting(java.lang.String lock_name, Owner owner)
awaiting
在接口中 LockNotification
public void awaited(java.lang.String lock_name, Owner owner)
awaited
在接口中 LockNotification
protected void loop() throws java.lang.Exception
java.lang.Exception
protected static java.util.List<java.lang.String> parseLockNames(java.lang.String line)
protected void printLocks()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
protected static void help()