|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.feature.persistence.lock.DefaultLock
class DefaultLock
Lock
implementation that is based on an SQL database.
DefaultLockManager
Constructor Summary | |
---|---|
DefaultLock(DefaultLockManager manager,
String jdbcConnId,
String id,
Date acquired,
Date expires,
int numLocked,
int numFailed)
Creates a new DefaultLock instance. |
Method Summary | |
---|---|
CloseableIterator<String> |
getFailedToLockFeatures()
Returns the ids of all features that have been requested to be locked, but which couldn't. |
String |
getId()
Returns the lock identifier. |
CloseableIterator<String> |
getLockedFeatures()
Returns the ids of all locked features. |
int |
getNumFailedToLock()
Returns the number of features that have been requested to be locked, but which couldn't. |
int |
getNumLocked()
Returns the number of locked features. |
boolean |
isLocked(String fid)
Returns whether this Lock involves the specified feature. |
void |
release()
Releases all locked features (invalidates the lock). |
void |
release(QName ftName,
Filter filter)
Releases the specified features from the lock. |
void |
release(String fid)
Releases the specified feature from the lock (if it was locked). |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
DefaultLock(DefaultLockManager manager, String jdbcConnId, String id, Date acquired, Date expires, int numLocked, int numFailed)
DefaultLock
instance.
manager
- corresponding DefaultLockManager
instance, must not be nulljdbcConnId
- id of the JDBC connection, must not be nullid
- lock id, must not be nullacquired
- time that the lock has been acquired, never nullexpires
- time that the lock will expire, never nullnumLocked
- number of locked featuresnumFailed
- number of features that have been requested to be locked, but which couldn'tMethod Detail |
---|
public String getId()
Lock
getId
in interface Lock
public int getNumLocked()
Lock
getNumLocked
in interface Lock
public int getNumFailedToLock()
Lock
getNumFailedToLock
in interface Lock
public CloseableIterator<String> getLockedFeatures() throws FeatureStoreException
Lock
NOTE: The caller must invoke CloseableIterator.close()
after it's not needed anymore -- otherwise,
backing resources (such as database connections) may not be freed.
getLockedFeatures
in interface Lock
FeatureStoreException
public CloseableIterator<String> getFailedToLockFeatures() throws FeatureStoreException
Lock
NOTE: The caller must invoke CloseableIterator.close()
after it's not needed anymore -- otherwise,
backing resources (such as database connections) may not be freed.
getFailedToLockFeatures
in interface Lock
FeatureStoreException
public boolean isLocked(String fid) throws FeatureStoreException
Lock
Lock
involves the specified feature.
isLocked
in interface Lock
fid
- id of the feature
FeatureStoreException
public void release() throws FeatureStoreException
Lock
release
in interface Lock
FeatureStoreException
public void release(String fid) throws FeatureStoreException
Lock
release
in interface Lock
fid
- id of the feature
FeatureStoreException
public void release(QName ftName, Filter filter) throws FeatureStoreException
Lock
release
in interface Lock
FeatureStoreException
public String toString()
toString
in class Object
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |