org.codehaus.wadi.core.util
Class ExtendableLease

java.lang.Object
  extended by org.codehaus.wadi.core.util.SimpleLease
      extended by org.codehaus.wadi.core.util.ExtendableLease
All Implemented Interfaces:
java.util.concurrent.locks.Lock, Lease

public class ExtendableLease
extends SimpleLease

Version:
$Revision$
Author:
Jules Gosnell

Nested Class Summary
 class ExtendableLease.ExtendableReleaser
           
static interface ExtendableLease.Extender
           
 
Nested classes/interfaces inherited from class org.codehaus.wadi.core.util.SimpleLease
SimpleLease.Releaser, SimpleLease.SimpleHandle
 
Nested classes/interfaces inherited from interface org.codehaus.wadi.core.util.Lease
Lease.Handle
 
Field Summary
protected static ExtendableLease.Extender _DefaultExtender
           
protected  ExtendableLease.Extender _extender
           
protected  long _leasePeriod
           
 
Fields inherited from class org.codehaus.wadi.core.util.SimpleLease
_daemon, _handles, _label, _lockLog, _sync
 
Constructor Summary
ExtendableLease(java.lang.String label, java.util.concurrent.locks.Lock sync)
           
 
Method Summary
 Lease.Handle acquire(long leasePeriod, ExtendableLease.Extender extender)
           
 Lease.Handle attempt(long timeframe, long leasePeriod, ExtendableLease.Extender extender)
           
protected  Lease.Handle setAlarm(long leasePeriod)
           
 
Methods inherited from class org.codehaus.wadi.core.util.SimpleLease
acquire, attempt, lock, lockInterruptibly, newCondition, release, toString, tryLock, tryLock, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_DefaultExtender

protected static final ExtendableLease.Extender _DefaultExtender

_extender

protected ExtendableLease.Extender _extender

_leasePeriod

protected long _leasePeriod
Constructor Detail

ExtendableLease

public ExtendableLease(java.lang.String label,
                       java.util.concurrent.locks.Lock sync)
Method Detail

acquire

public Lease.Handle acquire(long leasePeriod,
                            ExtendableLease.Extender extender)
                     throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

attempt

public Lease.Handle attempt(long timeframe,
                            long leasePeriod,
                            ExtendableLease.Extender extender)
                     throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

setAlarm

protected Lease.Handle setAlarm(long leasePeriod)
Overrides:
setAlarm in class SimpleLease


Copyright © 2011. All Rights Reserved.