Interface ResourceEventSource<R,P extends io.fabric8.kubernetes.api.model.HasMetadata>
-
- All Superinterfaces:
EventSource
,LifecycleAware
,ResourceOwner<R,P>
- All Known Implementing Classes:
AbstractResourceEventSource
,CachingEventSource
,CachingInboundEventSource
,ControllerResourceEventSource
,ExternalResourceCachingEventSource
,InformerEventSource
,ManagedInformerEventSource
,PerResourcePollingEventSource
,PollingEventSource
public interface ResourceEventSource<R,P extends io.fabric8.kubernetes.api.model.HasMetadata> extends EventSource, ResourceOwner<R,P>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Optional<R>
getSecondaryResource(P primary)
Retrieves the resource associated with the specified primary one, returning the actual state of the resource.Set<R>
getSecondaryResources(P primary)
-
Methods inherited from interface io.javaoperatorsdk.operator.processing.event.source.EventSource
setEventHandler
-
Methods inherited from interface io.javaoperatorsdk.operator.processing.LifecycleAware
start, stop
-
Methods inherited from interface io.javaoperatorsdk.operator.processing.ResourceOwner
resourceType
-
-
-
-
Method Detail
-
getSecondaryResource
default Optional<R> getSecondaryResource(P primary)
Description copied from interface:ResourceOwner
Retrieves the resource associated with the specified primary one, returning the actual state of the resource. Typically, this state might come from a local cache, updated after reconciliation.- Specified by:
getSecondaryResource
in interfaceResourceOwner<R,P extends io.fabric8.kubernetes.api.model.HasMetadata>
- Parameters:
primary
- the primary resource for which we want to retrieve the secondary resource- Returns:
- an
Optional
containing the secondary resource orOptional.empty()
if it doesn't exist
-
-