public class SharedInformerFactory extends BaseOperation
apiVersion, listType, typeapiGroupName, apiGroupVersion, client, config, context, JSON, JSON_MAPPER, JSON_PATCH, name, namespace, resourceT, STRATEGIC_MERGE_JSON_PATCH, YAML_MAPPERDEFAULT_BACKOFF_MULTIPLIER, DEFAULT_INITIAL_BACKOFF_MILLIS| Constructor and Description |
|---|
SharedInformerFactory(ExecutorService threadPool,
okhttp3.OkHttpClient okHttpClient,
Config configuration)
Constructor with thread pool specified.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSharedInformerEventListener(SharedInformerEventListener event) |
<T> SharedIndexInformer<T> |
getExistingSharedIndexInformer(Class<T> apiTypeClass)
Gets existing shared index informer, return null if the requesting informer
is never constructed.
|
SharedInformerFactory |
inNamespace(String namespace)
Configure Namespace for
SharedInformerFactory |
<T extends io.fabric8.kubernetes.api.model.HasMetadata> |
sharedIndexInformerFor(Class<T> apiTypeClass,
long resyncPeriodInMillis)
Constructs and returns a shared index informer with resync period specified.
|
<T extends io.fabric8.kubernetes.api.model.HasMetadata> |
sharedIndexInformerFor(Class<T> apiTypeClass,
OperationContext operationContext,
long resyncPeriodInMillis)
Constructs and returns a shared index informer with resync period specified.
|
<T extends CustomResource<?,?>,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>> |
sharedIndexInformerForCustomResource(Class<T> apiTypeClass,
Class<L> apiListTypeClass,
long resyncPeriodInMillis)
Constructs and returns a shared index informer with resync period specified for custom resources.
|
<T extends CustomResource<?,?>> |
sharedIndexInformerForCustomResource(Class<T> apiTypeClass,
long resyncPeriodInMillis)
Constructs and returns a shared index informer with resync period specified for custom resources.
|
<T extends CustomResource<?,?>> |
sharedIndexInformerForCustomResource(Class<T> apiTypeClass,
OperationContext operationContext,
long resyncPeriodInMillis)
Constructs and returns a shared index informer with resync period specified for custom resources.
|
void |
startAllRegisteredInformers()
Starts all registered informers.
|
void |
stopAllRegisteredInformers()
Stop all registered informers and shut down thread pool.
|
void |
stopAllRegisteredInformers(boolean shutDownThreadPool)
Stop all registered informers
|
SharedInformerFactory |
withName(String name)
Configure Name for
SharedInformerFactory |
accept, cascading, create, create, createOrReplace, delete, delete, delete, edit, edit, edit, fetchListUrl, forOperationType, fromServer, get, getApiVersion, getConfigType, getFieldQueryParam, getFields, getFieldsNot, getGracePeriodSeconds, getItem, getKind, getLabelQueryParam, getLabels, getLabelsIn, getLabelsNot, getLabelsNotIn, getListType, getMandatory, getOperationType, getPropagationPolicy, getReadiness, getReloadingFromServer, getResourceT, getResourceVersion, getRootPaths, getType, handleCreate, handleDeploymentRollback, handleGet, handlePatch, handlePatch, handleReplace, handleResponse, handleScale, inAnyNamespace, isApiGroup, isCascading, isReady, isReloadingFromServer, isResourceNamespaced, list, list, list, load, load, load, load, lockResourceVersion, newInstance, patch, replace, require, sendPatchedObject, setListType, setNamespace, setType, updateApiVersion, updateApiVersion, updateStatus, waitUntilCondition, waitUntilReady, watch, watch, watch, withField, withFields, withGracePeriod, withInvolvedObject, withItem, withLabel, withLabel, withLabelIn, withLabelNotIn, withLabels, withLabelSelector, withoutField, withoutFields, withoutLabel, withoutLabel, withoutLabels, withPropagationPolicy, withResourceVersion, withWaitRetryBackoffassertResponseCode, checkName, checkNamespace, createStatus, createStatus, getAPIGroup, getAPIVersion, getConfig, getName, getNamespace, getNamespacedUrl, getNamespacedUrl, getNamespacedUrl, getObjectValueAsMap, getResourceUrl, getResourceUrl, getRootUrl, handleCreate, handleDelete, handleDelete, handleDeploymentRollback, handleGet, handleGet, handleMetric, handlePatch, handlePatch, handleReplace, handleReplace, handleResponse, handleResponse, handleResponse, handleResponse, handleScale, handleStatusUpdate, requestException, requestFailure, unmarshal, unmarshal, unmarshalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getNamespacepublic SharedInformerFactory(ExecutorService threadPool, okhttp3.OkHttpClient okHttpClient, Config configuration)
threadPool - specified thread pool.okHttpClient - OkHttp clientconfiguration - configuration for clientpublic SharedInformerFactory inNamespace(String namespace)
SharedInformerFactoryinNamespace in interface NamespaceableinNamespace in class BaseOperationnamespace - namespace to configureSharedInformerFactory with namespace configuredpublic SharedInformerFactory withName(String name)
SharedInformerFactorywithName in interface NameablewithName in class BaseOperationname - name to be configuredSharedInformerFactory with name configuredpublic <T extends io.fabric8.kubernetes.api.model.HasMetadata> SharedIndexInformer<T> sharedIndexInformerFor(Class<T> apiTypeClass, long resyncPeriodInMillis)
T - the type parameter (should extend HasMetadata and implement Namespaced) if Namespace scoped resourceapiTypeClass - apiType classresyncPeriodInMillis - resync period in millisecondspublic <T extends io.fabric8.kubernetes.api.model.HasMetadata> SharedIndexInformer<T> sharedIndexInformerFor(Class<T> apiTypeClass, OperationContext operationContext, long resyncPeriodInMillis)
T - the type parameter (should extend HasMetadata and implement Namespaced) if Namespace scoped resourceapiTypeClass - apiType classoperationContext - OperationContext Operation ContextresyncPeriodInMillis - resync period in millisecondspublic <T extends CustomResource<?,?>> SharedIndexInformer<T> sharedIndexInformerForCustomResource(Class<T> apiTypeClass, OperationContext operationContext, long resyncPeriodInMillis)
T - the type parameter (should extend CustomResource and implement Namespaced)apiTypeClass - apiType classresyncPeriodInMillis - resync period in millisecondspublic <T extends CustomResource<?,?>> SharedIndexInformer<T> sharedIndexInformerForCustomResource(Class<T> apiTypeClass, long resyncPeriodInMillis)
T - the type parameter (should extend HasMetadata and implement Namespaced)apiTypeClass - apiType classresyncPeriodInMillis - resync period in millisecondspublic <T extends CustomResource<?,?>,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>> SharedIndexInformer<T> sharedIndexInformerForCustomResource(Class<T> apiTypeClass, Class<L> apiListTypeClass, long resyncPeriodInMillis)
T - the type parameter (should extend HasMetadata and implement Namespaced)L - the type's list parameter (should extend KubernetesResourceListapiTypeClass - apiType classapiListTypeClass - api list type classresyncPeriodInMillis - resync period in millisecondspublic <T> SharedIndexInformer<T> getExistingSharedIndexInformer(Class<T> apiTypeClass)
T - type of API typeapiTypeClass - API type classpublic void startAllRegisteredInformers()
public void stopAllRegisteredInformers()
public void stopAllRegisteredInformers(boolean shutDownThreadPool)
shutDownThreadPool - Whether to shut down thread pool or not.public void addSharedInformerEventListener(SharedInformerEventListener event)
Copyright © 2015–2021 Red Hat. All rights reserved.