protected BaseOperation(OkHttpClient client, Config config, String apiGroupName, String apiVersionNumber, String resourceT, String namespace, String name, Boolean cascading, T item, String resourceVersion, Boolean reloadingFromServer, long gracePeriodSeconds, Map<String, String> labels, Map<String, String> labelsNot, Map<String, String[]> labelsIn, Map<String, String[]> labelsNotIn, Map<String, String> fields) { super(client, config, apiGroup(item, apiGroupName), apiVersion(item, apiVersionNumber), resourceT, namespace, name(item, name)); this.cascading = cascading; this.item = item; this.reloadingFromServer = reloadingFromServer; this.type = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0]; this.listType = (Class<L>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[1]; this.doneableType = (Class<D>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[2]; this.reaper = null; this.resourceVersion = resourceVersion; this.gracePeriodSeconds = gracePeriodSeconds; this.labels = labels; this.labelsNot = labelsNot; this.labelsIn = labelsIn; this.labelsNotIn = labelsNotIn; this.fields = fields; }
protected BaseOperation(OkHttpClient client, Config config, String apiGroupName, String apiVersion, String resourceT, String namespace, String name, Boolean cascading, T item, String resourceVersion, Boolean reloadingFromServer, Class<T> type, Class<L> listType, Class<D> doneableType) { super(client, config, apiGroup(item, apiGroupName), apiVersion(item, apiVersion), resourceT, namespace, name(item, name)); this.cascading = cascading; this.item = item; this.resourceVersion = resourceVersion; this.reloadingFromServer = reloadingFromServer; this.type = type; this.listType = listType; this.doneableType = doneableType; this.reaper = null; this.gracePeriodSeconds = -1; this.labels = new TreeMap<>(); this.labelsNot = new TreeMap<>(); this.labelsIn = new TreeMap<>(); this.labelsNotIn = new TreeMap<>(); this.fields = new TreeMap<>(); }
public RollableScalableResourceOperation(OkHttpClient client, Config config, String apiVersionGroup, String apiVersionNumber, String resourceT, String namespace, String name, Boolean cascading, T item, String resourceVersion, Boolean reloadingFromServer, long gracePeriodSeconds, Map<String, String> labels, Map<String, String> labelsNot, Map<String, String[]> labelsIn, Map<String, String[]> labelsNotIn, Map<String, String> fields, Boolean rolling, long rollingTimeout, TimeUnit rollingTimeUnit) { super(client, config, ApiVersionUtil.apiGroup(item, apiVersionGroup), ApiVersionUtil.apiVersion(item, apiVersionNumber), resourceT, namespace, name, cascading, item, resourceVersion, reloadingFromServer, gracePeriodSeconds, labels, labelsNot, labelsIn, labelsNotIn, fields); this.rolling = rolling; this.rollingTimeout = rollingTimeout; this.rollingTimeUnit = rollingTimeUnit; reaper = new ScalableReaper(this); }