|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.geotools.data.Lock
Used to Lock features for long transaction operations.
This class is responsible for supplying a unique ID for TransactionDataSource locking operations.
Example:
Lock lock = Lock.create( 1800 ); // expire in 18 min
Although it is tempting to have these Lock objects stored in a static repository in the manner of GeoServer's TypeRepository.InternalLock - that decision should be left to the individual DataSources.
An AbstractTransactionalDataSource with appropriate overrideable callbacks may be an elegent way to acomplish this for.
Field Summary | |
private static int |
count
|
private java.util.Date |
date
|
private java.lang.String |
id
|
Constructor Summary | |
private |
Lock(java.lang.String id,
java.util.Date date)
Private constructor - use create factory method |
Method Summary | |
static Lock |
create(int expire)
Create a Lock for use. |
long |
getExpire()
Time from now the lock will expire |
java.lang.String |
getID()
LockId used for transaction authorization. |
private static int |
nextIdNumber()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.lang.String id
private final java.util.Date date
private static int count
Constructor Detail |
private Lock(java.lang.String id, java.util.Date date)
Method Detail |
public java.lang.String getID()
public long getExpire()
public static Lock create(int expire)
expire
- Time from now that the lock will expire.private static int nextIdNumber()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |