Class DefaultSharedIndexInformerFactory

java.lang.Object
io.kubernetes.client.informer.SharedInformerFactory
io.micronaut.kubernetes.client.informer.DefaultSharedIndexInformerFactory
All Implemented Interfaces:
SharedIndexInformerFactory

@Requires(property="kubernetes.client.informer.enabled", notEquals="false", defaultValue="true") @Singleton public class DefaultSharedIndexInformerFactory extends io.kubernetes.client.informer.SharedInformerFactory implements SharedIndexInformerFactory
Default implementation of the SharedIndexInformerFactory. The created SharedIndexInformer is shared in scope of the namespace.
Since:
3.1
Author:
Pavol Gressa
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class io.kubernetes.client.informer.SharedInformerFactory

    informers
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultSharedIndexInformerFactory(InformerConfiguration informerConfiguration, io.kubernetes.client.openapi.ApiClient apiClient)
    Deprecated.
    DefaultSharedIndexInformerFactory(InformerConfiguration informerConfiguration, jakarta.inject.Provider<io.kubernetes.client.openapi.ApiClient> apiClient)
    Creates DefaultSharedIndexInformer.
  • Method Summary

    Modifier and Type
    Method
    Description
    <ApiType extends io.kubernetes.client.common.KubernetesObject>
    io.kubernetes.client.informer.SharedIndexInformer<ApiType>
    getExistingSharedIndexInformer(String namespace, Class<ApiType> apiTypeClass)
    Get existing SharedIndexInformer.
    List<io.kubernetes.client.informer.SharedIndexInformer>
    Get all existing SharedIndexInformer.
    <ApiType extends io.kubernetes.client.common.KubernetesObject, ApiListType extends io.kubernetes.client.common.KubernetesListObject>
    io.kubernetes.client.informer.SharedIndexInformer<ApiType>
    sharedIndexInformerFor(Class<ApiType> apiType, Class<ApiListType> apiListType, String resourcePlural, String apiGroup, @Nullable String namespace, @Nullable String labelSelector, @Nullable Long resyncCheckPeriod, boolean waitForSync)
    Creates new SharedIndexInformer.
    <ApiType extends io.kubernetes.client.common.KubernetesObject, ApiListType extends io.kubernetes.client.common.KubernetesListObject>
    List<io.kubernetes.client.informer.SharedIndexInformer<? extends io.kubernetes.client.common.KubernetesObject>>
    sharedIndexInformersFor(Class<ApiType> apiTypeClass, Class<ApiListType> apiListTypeClass, String resourcePlural, String apiGroup, @Nullable List<String> namespaces, @Nullable String labelSelector, @Nullable Long resyncCheckPeriod, boolean waitForSync)
    Creates new SharedIndexInformers for every namespace from namespaces param.
    void
    Stop all registered informers.

    Methods inherited from class io.kubernetes.client.informer.SharedInformerFactory

    getExistingSharedIndexInformer, sharedIndexInformerFor, sharedIndexInformerFor, sharedIndexInformerFor, sharedIndexInformerFor, sharedIndexInformerFor, sharedIndexInformerFor, sharedIndexInformerFor, sharedIndexInformerFor, startAllRegisteredInformers, stopAllRegisteredInformers

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.kubernetes.client.informer.SharedIndexInformerFactory

    startAllRegisteredInformers
  • Field Details

  • Constructor Details

    • DefaultSharedIndexInformerFactory

      @Deprecated public DefaultSharedIndexInformerFactory(InformerConfiguration informerConfiguration, io.kubernetes.client.openapi.ApiClient apiClient)
      Deprecated.
      Creates DefaultSharedIndexInformer.
      Parameters:
      informerConfiguration - informer configuration
      apiClient - api client
    • DefaultSharedIndexInformerFactory

      @Inject public DefaultSharedIndexInformerFactory(InformerConfiguration informerConfiguration, jakarta.inject.Provider<io.kubernetes.client.openapi.ApiClient> apiClient)
      Creates DefaultSharedIndexInformer.
      Parameters:
      informerConfiguration - informer configuration
      apiClient - api client
      Since:
      3.4.0
  • Method Details

    • sharedIndexInformerFor

      public <ApiType extends io.kubernetes.client.common.KubernetesObject, ApiListType extends io.kubernetes.client.common.KubernetesListObject> io.kubernetes.client.informer.SharedIndexInformer<ApiType> sharedIndexInformerFor(Class<ApiType> apiType, Class<ApiListType> apiListType, String resourcePlural, String apiGroup, @Nullable @Nullable String namespace, @Nullable @Nullable String labelSelector, @Nullable @Nullable Long resyncCheckPeriod, boolean waitForSync)
      Description copied from interface: SharedIndexInformerFactory
      Creates new SharedIndexInformer.
      Specified by:
      sharedIndexInformerFor in interface SharedIndexInformerFactory
      Type Parameters:
      ApiType - api type
      ApiListType - api list type
      Parameters:
      apiType - api type class
      apiListType - api list type class
      resourcePlural - resource api group
      apiGroup - resource plural
      namespace - namespace
      labelSelector - label selector
      resyncCheckPeriod - resync check period
      waitForSync - wait to let informer sync the resources
      Returns:
      list of informers
    • sharedIndexInformersFor

      public <ApiType extends io.kubernetes.client.common.KubernetesObject, ApiListType extends io.kubernetes.client.common.KubernetesListObject> List<io.kubernetes.client.informer.SharedIndexInformer<? extends io.kubernetes.client.common.KubernetesObject>> sharedIndexInformersFor(Class<ApiType> apiTypeClass, Class<ApiListType> apiListTypeClass, String resourcePlural, String apiGroup, @Nullable @Nullable List<String> namespaces, @Nullable @Nullable String labelSelector, @Nullable @Nullable Long resyncCheckPeriod, boolean waitForSync)
      Description copied from interface: SharedIndexInformerFactory
      Creates new SharedIndexInformers for every namespace from namespaces param.
      Specified by:
      sharedIndexInformersFor in interface SharedIndexInformerFactory
      Type Parameters:
      ApiType - api type
      ApiListType - api list type
      Parameters:
      apiTypeClass - api type class
      apiListTypeClass - api list type class
      resourcePlural - resource plural
      apiGroup - resource api group
      namespaces - namespaces
      labelSelector - label selector
      resyncCheckPeriod - resync check period
      waitForSync - wait to let informer sync the resources
      Returns:
      list of informers
    • stopAllRegisteredInformers

      public void stopAllRegisteredInformers()
      Description copied from interface: SharedIndexInformerFactory
      Stop all registered informers.
      Specified by:
      stopAllRegisteredInformers in interface SharedIndexInformerFactory
      Overrides:
      stopAllRegisteredInformers in class io.kubernetes.client.informer.SharedInformerFactory
    • getExistingSharedIndexInformer

      public <ApiType extends io.kubernetes.client.common.KubernetesObject> io.kubernetes.client.informer.SharedIndexInformer<ApiType> getExistingSharedIndexInformer(String namespace, Class<ApiType> apiTypeClass)
      Description copied from interface: SharedIndexInformerFactory
      Get existing SharedIndexInformer.
      Specified by:
      getExistingSharedIndexInformer in interface SharedIndexInformerFactory
      Type Parameters:
      ApiType - api type
      Parameters:
      namespace - namespace
      apiTypeClass - api type class
      Returns:
      shared index informer or null if not found
    • getExistingSharedIndexInformers

      public List<io.kubernetes.client.informer.SharedIndexInformer> getExistingSharedIndexInformers()
      Description copied from interface: SharedIndexInformerFactory
      Get all existing SharedIndexInformer.
      Specified by:
      getExistingSharedIndexInformers in interface SharedIndexInformerFactory
      Returns:
      list of existing shared informers