com.atlassian.bamboo.utils
Class RecentLazyReference<T>

java.lang.Object
  extended by com.atlassian.util.concurrent.ResettableLazyReference<T>
      extended by com.atlassian.bamboo.utils.RecentLazyReference<T>
All Implemented Interfaces:
com.atlassian.util.concurrent.Supplier<T>

public abstract class RecentLazyReference<T>
extends com.atlassian.util.concurrent.ResettableLazyReference<T>


Nested Class Summary
static interface RecentLazyReference.RecentPredicate
           
 
Constructor Summary
RecentLazyReference(long amount, TimeUnit unit)
           
RecentLazyReference(RecentLazyReference.RecentPredicate recentPredicate)
           
 
Method Summary
protected  T create()
           
protected abstract  T createInstance()
           
 T get()
           
 void setRecentPredicate(long amount, TimeUnit unit)
           
 void setRecentPredicate(RecentLazyReference.RecentPredicate recentPredicate)
           
 
Methods inherited from class com.atlassian.util.concurrent.ResettableLazyReference
cancel, getInterruptibly, isInitialized, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecentLazyReference

public RecentLazyReference(long amount,
                           TimeUnit unit)

RecentLazyReference

public RecentLazyReference(RecentLazyReference.RecentPredicate recentPredicate)
Method Detail

setRecentPredicate

public void setRecentPredicate(long amount,
                               TimeUnit unit)

setRecentPredicate

public void setRecentPredicate(RecentLazyReference.RecentPredicate recentPredicate)

get

public T get()
Specified by:
get in interface com.atlassian.util.concurrent.Supplier<T>
Overrides:
get in class com.atlassian.util.concurrent.ResettableLazyReference<T>

create

protected final T create()
                  throws Exception
Specified by:
create in class com.atlassian.util.concurrent.ResettableLazyReference<T>
Throws:
Exception

createInstance

protected abstract T createInstance()
                             throws Exception
Throws:
Exception


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.