org.geotools.data.directory
Class DirectoryLockingManager

Object
  extended by DirectoryLockingManager
All Implemented Interfaces:
LockingManager

public class DirectoryLockingManager
extends Object
implements LockingManager

Locking manager that will delegate its work to the locking managers of the delegate data stores

Author:
Andrea Aime - OpenGeo

Constructor Summary
DirectoryLockingManager(DirectoryTypeCache cache)
           
 
Method Summary
 boolean exists(String authID)
          Check if any locks exist held by the authorization lockID.
 void lockFeatureID(String typeName, String authID, Transaction transaction, FeatureLock featureLock)
          FeatureID based locking.
 boolean refresh(String authID, Transaction transaction)
          Refresh locks held by the authorization lockID.
 boolean release(String authID, Transaction transaction)
          Release locks held by the authorization lockID.
 void unLockFeatureID(String typeName, String authID, Transaction transaction, FeatureLock featureLock)
          FeatureID based unlocking.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryLockingManager

public DirectoryLockingManager(DirectoryTypeCache cache)
Method Detail

exists

public boolean exists(String authID)
Description copied from interface: LockingManager
Check if any locks exist held by the authorization lockID.

(remember that the lock may have expired)

Specified by:
exists in interface LockingManager
Parameters:
authID - Authorization for lock
Returns:
true if lock was found

release

public boolean release(String authID,
                       Transaction transaction)
                throws IOException
Description copied from interface: LockingManager
Release locks held by the authorization lockID.

(remember that the lock may have expired)

Specified by:
release in interface LockingManager
Parameters:
authID - Authorization for lock
transaction - Transaction with authorization for lockID
Returns:
true if lock was found and released
Throws:
IOException - DOCUMENT ME!

refresh

public boolean refresh(String authID,
                       Transaction transaction)
                throws IOException
Description copied from interface: LockingManager
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)

Specified by:
refresh in interface LockingManager
Parameters:
authID - Authorization for lock
transaction - Transaction with authorization for lockID
Returns:
true if lock was found and refreshed
Throws:
IOException - DOCUMENT ME!

unLockFeatureID

public void unLockFeatureID(String typeName,
                            String authID,
                            Transaction transaction,
                            FeatureLock featureLock)
                     throws IOException
Description copied from interface: LockingManager
FeatureID based unlocking.

Specified by:
unLockFeatureID in interface LockingManager
Throws:
IOException - DOCUMENT ME!

lockFeatureID

public void lockFeatureID(String typeName,
                          String authID,
                          Transaction transaction,
                          FeatureLock featureLock)
                   throws IOException
Description copied from interface: LockingManager
FeatureID based locking.

Specified by:
lockFeatureID in interface LockingManager
Throws:
IOException - DOCUMENT ME!


Copyright © 1996-2014 Geotools. All Rights Reserved.