Java源码示例:io.fabric8.kubernetes.client.dsl.base.OperationContext

示例1
public Controller(Class<T> apiTypeClass, DeltaFIFO<T> queue, ListerWatcher<T, L> listerWatcher, Consumer<Deque<AbstractMap.SimpleEntry<DeltaFIFO.DeltaType, Object>>> processFunc, Supplier<Boolean> resyncFunc, long fullResyncPeriod, OperationContext context, ConcurrentLinkedQueue<SharedInformerEventListener> eventListeners) {
  this.queue = queue;
  this.listerWatcher = listerWatcher;
  this.apiTypeClass = apiTypeClass;
  this.processFunc = processFunc;
  this.resyncFunc = resyncFunc;
  this.fullResyncPeriod = fullResyncPeriod;
  this.operationContext = context;
  this.eventListeners = eventListeners;

  // Starts one daemon thread for reflector
  this.reflectExecutor = Executors.newSingleThreadScheduledExecutor();

  // Starts one daemon thread for resync
  this.resyncExecutor = Executors.newSingleThreadScheduledExecutor();
}
 
示例2
public ServiceMonitorOperationsImpl(OperationContext context) {
  super(context.withApiGroupName("monitoring.coreos.om")
  .withApiGroupVersion("v1")
  .withPlural("servicemonitors"));
  this.type = ServiceMonitor.class;
  this.listType = ServiceMonitorList.class;
  this.doneableType = DoneableServiceMonitor.class;
}
 
示例3
public ClusterRoleBindingOperationsImpl(OperationContext context) {
  super(context.withApiGroupName(AUTHORIZATION)
    .withPlural("clusterrolebindings"));
  this.type = ClusterRoleBinding.class;
  this.listType = ClusterRoleBindingList.class;
  this.doneableType = DoneableClusterRoleBinding.class;
}
 
示例4
public GroupOperationsImpl(OperationContext context) {
  super(context.withApiGroupName(USER)
    .withPlural("groups"));
  this.type = Group.class;
  this.listType = GroupList.class;
  this.doneableType = DoneableGroup.class;
}
 
示例5
public DefaultSharedIndexInformer(Class<T> apiTypeClass, ListerWatcher<T, L> listerWatcher, long resyncPeriod, OperationContext context, ConcurrentLinkedQueue<SharedInformerEventListener> eventListeners) {
  this.resyncCheckPeriodMillis = resyncPeriod;
  this.defaultEventHandlerResyncPeriod = resyncPeriod;

  this.processor = new SharedProcessor<>();
  this.indexer = new Cache();

  DeltaFIFO<T> fifo = new DeltaFIFO<>(Cache::metaNamespaceKeyFunc, this.indexer);

  this.controller = new Controller<>(apiTypeClass, fifo, listerWatcher, this::handleDeltas, processor::shouldResync, resyncCheckPeriodMillis, context, eventListeners);
  controllerThread = new Thread(controller::run, "informer-controller-" + apiTypeClass.getSimpleName());
}
 
示例6
public CustomResourceDefinitionOperationsImpl(OperationContext context) {
  super(context.withApiGroupName("apiextensions.k8s.io")
    .withApiGroupVersion("v1beta1")
    .withPlural("customresourcedefinitions"));
  this.type = CustomResourceDefinition.class;
  this.listType = CustomResourceDefinitionList.class;
  this.doneableType = DoneableCustomResourceDefinition.class;
}
 
示例7
public JobOperationsImpl(OperationContext context) {
  super(context.withApiGroupName("batch")
    .withApiGroupVersion("v1")
    .withPlural("jobs"));

  this.type = Job.class;
  this.listType = JobList.class;
  this.doneableType = DoneableJob.class;
}
 
示例8
public CronJobOperationsImpl(OperationContext context) {
  super(context.withApiGroupName("batch")
    .withApiGroupVersion("v1beta1")
    .withCascading(true)
    .withPlural("cronjobs"));
  this.type = CronJob.class;
  this.listType = CronJobList.class;
  this.doneableType = DoneableCronJob.class;
}
 
示例9
public OAuthClientOperationsImpl(OperationContext context) {
  super(context.withApiGroupName(OAUTH)
    .withPlural("oauthclients"));
  this.type = OAuthClient.class;
  this.listType = OAuthClientList.class;
  this.doneableType = DoneableOAuthClient.class;
}
 
示例10
public BindingOperationsImpl(OperationContext context) {
  super(context
    .withApiGroupVersion("v1")
    .withPlural("bindings"));
  this.type = Binding.class;
  this.listType = (Class<KubernetesResourceList<Binding>>)new TypeReference<KubernetesResourceList<Binding>>(){}.getType();
  this.doneableType = DoneableBinding.class;
}
 
示例11
public ClusterServiceClassOperationsImpl(OperationContext ctx) {
    super(ctx.withApiGroupName("servicecatalog.k8s.io").withApiGroupVersion("v1beta1").withPlural("clusterserviceclasses"));
    this.type=ClusterServiceClass.class;
    this.listType=ClusterServiceClassList.class;
    this.doneableType= DoneableClusterServiceClass.class;

}
 
示例12
public RoleBindingOperationsImpl(OperationContext context) {
  super(context.withApiGroupName(AUTHORIZATION)
    .withPlural("rolebindings"));
  this.type = RoleBinding.class;
  this.listType = RoleBindingList.class;
  this.doneableType = DoneableRoleBinding.class;
}
 
示例13
public OAuthAccessTokenOperationsImpl(OperationContext context) {
  super(context.withApiGroupName(OAUTH)
    .withPlural("oauthaccesstokens"));
  this.type = OAuthAccessToken.class;
  this.listType = OAuthAccessTokenList.class;
  this.doneableType = DoneableOAuthAccessToken.class;
}
 
示例14
public UserOperationsImpl(OperationContext context) {
  super(context.withApiGroupName(USER)
    .withPlural("users"));
  this.type = User.class;
  this.listType = UserList.class;
  this.doneableType = DoneableUser.class;
}
 
示例15
public ProjectOperationsImpl(OperationContext context) {
  super(context.withApiGroupName(PROJECT)
    .withPlural("projects"));
  this.type = Project.class;
  this.listType = ProjectList.class;
  this.doneableType = DoneableProject.class;
}
 
示例16
public SecurityContextConstraintsOperationsImpl(OperationContext context) {
  super(context.withApiGroupName(SECURITY)
    .withPlural("securitycontextconstraints"));
  this.type = SecurityContextConstraints.class;
  this.listType = SecurityContextConstraintsList.class;
  this.doneableType = DoneableSecurityContextConstraints.class;
}
 
示例17
public OAuthAuthorizeTokenOperationsImpl(OperationContext context) {
  super(context.withApiGroupName(OAUTH)
    .withPlural("oauthauthorizetokens"));
  this.type = OAuthAuthorizeToken.class;
  this.listType = OAuthAuthorizeTokenList.class;
  this.doneableType = DoneableOAuthAuthorizeToken.class;
}
 
示例18
public ServiceMonitorOperationsImpl(OkHttpClient client, Config config) {
  this(new OperationContext().withOkhttpClient(client).withConfig(config));
}
 
示例19
public ServiceMonitorOperationsImpl newInstance(OperationContext context) {
  return new ServiceMonitorOperationsImpl(context);
}
 
示例20
public ClusterRoleBindingOperationsImpl(OkHttpClient client, OpenShiftConfig config) {
  this(new OperationContext().withOkhttpClient(client).withConfig(config));
}
 
示例21
@Override
public GroupOperationsImpl newInstance(OperationContext context) {
  return new GroupOperationsImpl(context);
}
 
示例22
public ClusterOperationsImpl(OkHttpClient client, Config config, String item) {
  super(new OperationContext().withOkhttpClient(client).withConfig(config));
  this.versionEndpoint = item;
}
 
示例23
public CustomResourceDefinitionOperationsImpl(OkHttpClient client, Config config, String namespace) {
  this(new OperationContext().withOkhttpClient(client).withConfig(config).withNamespace(namespace).withPropagationPolicy(DEFAULT_PROPAGATION_POLICY));
}
 
示例24
@Override
public CustomResourceDefinitionOperationsImpl newInstance(OperationContext context) {
  return new CustomResourceDefinitionOperationsImpl(context);
}
 
示例25
public JobOperationsImpl(OkHttpClient client, Config config, String namespace) {
  this(new OperationContext().withOkhttpClient(client).withConfig(config).withNamespace(namespace).withPropagationPolicy(DEFAULT_PROPAGATION_POLICY));
}
 
示例26
@Override
public JobOperationsImpl newInstance(OperationContext context) {
  return new JobOperationsImpl(context);
}
 
示例27
public CronJobOperationsImpl(OkHttpClient client, Config config, String namespace) {
  this(new OperationContext().withOkhttpClient(client).withConfig(config).withNamespace(namespace).withPropagationPolicy(DEFAULT_PROPAGATION_POLICY));
}
 
示例28
@Override
public OAuthAuthorizeTokenOperationsImpl newInstance(OperationContext context) {
  return new OAuthAuthorizeTokenOperationsImpl(context);
}
 
示例29
public NodeMetricOperationsImpl(OkHttpClient client, Config config) {
	super(new OperationContext().withOkhttpClient(client).withConfig(config));
}
 
示例30
@Override
public DeploymentOperationsImpl newInstance(OperationContext context) {
  return new DeploymentOperationsImpl((RollingOperationContext) context);
}