org.geotools.data
Interface LockingManager

All Known Implementing Classes:
InProcessLockingManager

public interface LockingManager

This class describes a featureID based locking service.

AbstractFeatureLocking, and others, may use this API to request locks on the basis of FeatureID.

This class is also used as a public api to manage locks.

Author:
Jody Garnett, Refractions Research

Method Summary
 boolean exists(java.lang.String authID)
          Check if any locks exist held by the authorization lockID.
 void lockFeatureID(java.lang.String typeName, java.lang.String authID, Transaction transaction, FeatureLock featureLock)
          FeatureID based locking.
 boolean refresh(java.lang.String authID, Transaction transaction)
          Refresh locks held by the authorization lockID.
 boolean release(java.lang.String authID, Transaction transaction)
          Release locks held by the authorization lockID.
 void unLockFeatureID(java.lang.String typeName, java.lang.String authID, Transaction transaction, FeatureLock featureLock)
          FeatureID based unlocking.
 

Method Detail

exists

public boolean exists(java.lang.String authID)
Check if any locks exist held by the authorization lockID.

(remember that the lock may have expired)

Returns:
true if lock was found

release

public boolean release(java.lang.String authID,
                       Transaction transaction)
                throws java.io.IOException
Release locks held by the authorization lockID.

(remember that the lock may have expired)

Parameters:
transaction - Transaction with authorization for lockID
Returns:
true if lock was found and released
Throws:
java.io.IOException

refresh

public boolean refresh(java.lang.String authID,
                       Transaction transaction)
                throws java.io.IOException
Refresh locks held by the authorization lockID.

All features locked with the provied lockID will be locked for additional time (the origional duration requested).

(remember that the lock may have expired)

Parameters:
transaction - Transaction with authorization for lockID
Returns:
true if lock was found and refreshed
Throws:
java.io.IOException

unLockFeatureID

public void unLockFeatureID(java.lang.String typeName,
                            java.lang.String authID,
                            Transaction transaction,
                            FeatureLock featureLock)
                     throws java.io.IOException
FeatureID based unlocking.

Parameters:
typeName -
authID -
transaction -
featureLock -
Throws:
java.io.IOException

lockFeatureID

public void lockFeatureID(java.lang.String typeName,
                          java.lang.String authID,
                          Transaction transaction,
                          FeatureLock featureLock)
                   throws java.io.IOException
FeatureID based locking.

Parameters:
typeName -
transaction -
featureLock -
Throws:
java.io.IOException


Copyright © 1996-2003 GeoTools. All Rights Reserved.