com.atlassian.bamboo.utils.expirables
Class ExpiryHandlerImpl

java.lang.Object
  extended by com.atlassian.bamboo.utils.expirables.ExpiryHandlerImpl
All Implemented Interfaces:
ExpiryHandler

public final class ExpiryHandlerImpl
extends java.lang.Object
implements ExpiryHandler


Constructor Summary
ExpiryHandlerImpl(Expirable expiring, BambooTimeValue timeToIdle, ExpiryTicker expiryTicker)
           
 
Method Summary
 long expiryTick()
          Called periodically by $ExpiryTicker.
 void onCreate()
          Called when an expirable object is created/recreated.
 void onUse()
          Called when an expirable object is used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpiryHandlerImpl

public ExpiryHandlerImpl(@NotNull
                         Expirable expiring,
                         @NotNull
                         BambooTimeValue timeToIdle,
                         @NotNull
                         ExpiryTicker expiryTicker)
Method Detail

onCreate

public void onCreate()
Description copied from interface: ExpiryHandler
Called when an expirable object is created/recreated.

Specified by:
onCreate in interface ExpiryHandler

onUse

public void onUse()
Description copied from interface: ExpiryHandler
Called when an expirable object is used.

Specified by:
onUse in interface ExpiryHandler

expiryTick

public long expiryTick()
Description copied from interface: ExpiryHandler
Called periodically by $ExpiryTicker. Should be used to expire the object if it's too old.

Specified by:
expiryTick in interface ExpiryHandler
Returns:
-1 if the object has been expired. 0 if it has not been expired. Optionally, can return the nearest timestamp when the object may be expired.


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.