org.jclouds.compute.predicates.internal
Class RefreshAndDoubleCheckOnFailUnlessStatusInvalid<S extends Enum<S>,C extends ComputeMetadataIncludingStatus<S>>
java.lang.Object
org.jclouds.compute.predicates.internal.RefreshAndDoubleCheckOnFailUnlessStatusInvalid<S,C>
- All Implemented Interfaces:
- com.google.common.base.Predicate<AtomicReference<C>>
- Direct Known Subclasses:
- RefreshImageAndDoubleCheckOnFailUnlessStatusInvalid, RefreshNodeAndDoubleCheckOnFailUnlessStatusInvalid
@Singleton
public abstract class RefreshAndDoubleCheckOnFailUnlessStatusInvalid<S extends Enum<S>,C extends ComputeMetadataIncludingStatus<S>>
- extends Object
- implements com.google.common.base.Predicate<AtomicReference<C>>
Keep an atomic reference to a
resource, so as to eliminate a redundant ComputeService#getNodeMetadata call after the
predicate passes.
|
Field Summary |
protected org.jclouds.logging.Logger |
logger
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.google.common.base.Predicate |
equals |
logger
protected org.jclouds.logging.Logger logger
RefreshAndDoubleCheckOnFailUnlessStatusInvalid
public RefreshAndDoubleCheckOnFailUnlessStatusInvalid(S intended,
Set<S> invalids)
apply
public boolean apply(AtomicReference<C> atomicResource)
- Specified by:
apply in interface com.google.common.base.Predicate<AtomicReference<C extends ComputeMetadataIncludingStatus<S>>>
checkStatus
public boolean checkStatus(C resource)
refreshOrNull
protected abstract C refreshOrNull(C resource)
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.