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>>
,Predicate<AtomicReference<C>>
- Direct Known Subclasses:
RefreshImageAndDoubleCheckOnFailUnlessStatusInvalid
,RefreshNodeAndDoubleCheckOnFailUnlessStatusInvalid
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 redundantComputeService#getNodeMetadata
call after the predicate passes.
-
-
Constructor Summary
Constructors Constructor Description RefreshAndDoubleCheckOnFailUnlessStatusInvalid(S intended, Set<S> invalids)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
apply(AtomicReference<C> atomicResource)
boolean
checkStatus(C resource)
protected abstract C
refreshOrNull(C resource)
-
-
-
Field Detail
-
logger
protected Logger logger
-
-