org.geotools.data
Class FeatureLock

Object
  extended by FeatureLock
Direct Known Subclasses:
DefaultFeatureLock, LockRequest

public class FeatureLock
extends Object

Used in conjuction with FeatureLocking to lock features during a transaction. This class is responsible for supplying a unique Authorization ID and expiry period.

A FeatureLock representing the Current Transaction has been provided as a static constant: TRANSACTION.

Author:
Jody Garnett, Refractions Research, Inc.
See Also:
Database Reseach, Transactional WFS Design, Design Implications, FeatureLockFactory

Field Summary
protected  String authorization
           
protected  long duration
           
static FeatureLock TRANSACTION
           
 
Constructor Summary
FeatureLock(String authorization, long duration)
          Creates a new lock.
 
Method Summary
 String getAuthorization()
          Gets the ID used for transaction authorization.
 long getDuration()
          Gets the expiry time for this lock (in minutes).
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSACTION

public static final FeatureLock TRANSACTION

authorization

protected String authorization

duration

protected long duration
Constructor Detail

FeatureLock

public FeatureLock(String authorization,
                   long duration)
Creates a new lock.

Parameters:
authorization - LockId used to authorize the transaction
duration - expiry period of this lock (in minutes)
Method Detail

getAuthorization

public String getAuthorization()
Gets the ID used for transaction authorization.

Returns:
the authorization ID

getDuration

public long getDuration()
Gets the expiry time for this lock (in minutes).

Returns:
expiry period


Copyright © 1996-2014 Geotools. All Rights Reserved.