01: package net.sf.hajdbc.distributable;
02:
03: import java.io.Serializable;
04: import java.util.Map;
05: import java.util.concurrent.locks.Lock;
06:
07: import net.sf.hajdbc.LockManager;
08:
09: import org.jgroups.Address;
10:
11: public interface LockDecree extends Serializable {
12: /**
13: * Returns the address of the node that requested the lock
14: * @return a node address
15: */
16: public Address getAddress();
17:
18: /**
19: * Execute lock operation.
20: * @param lockManager a lock manager
21: * @param lockMap a map of object identifier to lock
22: * @return true if operation was successful, false otherwise.
23: */
24: public boolean vote(LockManager lockManager,
25: Map<String, Lock> lockMap);
26: }
|