Interface ResourceHandler<T,​V extends io.fabric8.kubernetes.api.builder.VisitableBuilder<T,​V>>

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  ResourceHandler.Key  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T create​(okhttp3.OkHttpClient client, Config config, String namespace, T item, boolean dryRun)
      Create the specified resource
      Boolean delete​(okhttp3.OkHttpClient client, Config config, String namespace, io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy, long gracePeriodSeconds, T item, boolean dryRun)
      Delete the specified resource (if exists).
      V edit​(T item)
      Edit the specified resource.
      String getApiVersion()  
      String getKind()  
      T reload​(okhttp3.OkHttpClient client, Config config, String namespace, T item)
      Reload the specified resource (if exists).
      T replace​(okhttp3.OkHttpClient client, Config config, String namespace, T item, boolean dryRun)
      Replace the specified resource
      T waitUntilCondition​(okhttp3.OkHttpClient client, Config config, String namespace, T item, Predicate<T> condition, long amount, TimeUnit timeUnit)  
      T waitUntilReady​(okhttp3.OkHttpClient client, Config config, String namespace, T item, long amount, TimeUnit timeUnit)
      Waits until the specified resource is Ready.
      Watch watch​(okhttp3.OkHttpClient client, Config config, String namespace, T item, io.fabric8.kubernetes.api.model.ListOptions listOptions, Watcher<T> watcher)
      Watches the specified resource for changes
      Watch watch​(okhttp3.OkHttpClient client, Config config, String namespace, T item, Watcher<T> watcher)
      Watches the specified resource for changes.
      Watch watch​(okhttp3.OkHttpClient client, Config config, String namespace, T item, String resourceVersion, Watcher<T> watcher)
      Watches the specified resource for changes.
    • Method Detail

      • getApiVersion

        String getApiVersion()
      • create

        T create​(okhttp3.OkHttpClient client,
                 Config config,
                 String namespace,
                 T item,
                 boolean dryRun)
        Create the specified resource
        Parameters:
        client - An instance of the http client.
        config - The client config.
        namespace - The target namespace.
        item - The resource to create.
        dryRun - Enable dry run
        Returns:
        The created resource.
      • replace

        T replace​(okhttp3.OkHttpClient client,
                  Config config,
                  String namespace,
                  T item,
                  boolean dryRun)
        Replace the specified resource
        Parameters:
        client - An instance of the http client.
        config - The client config.
        namespace - The target namespace.
        item - The resource to replace.
        dryRun - Enable dry run
        Returns:
        The replaced resource.
      • reload

        T reload​(okhttp3.OkHttpClient client,
                 Config config,
                 String namespace,
                 T item)
        Reload the specified resource (if exists).
        Parameters:
        client - An instance of the http client.
        config - The client config.
        namespace - The target namespace.
        item - The resource to reload.
        Returns:
        The reloaded resource.
      • edit

        V edit​(T item)
        Edit the specified resource.
        Parameters:
        item - The resource to edit.
        Returns:
        The resource editor.
      • delete

        Boolean delete​(okhttp3.OkHttpClient client,
                       Config config,
                       String namespace,
                       io.fabric8.kubernetes.api.model.DeletionPropagation propagationPolicy,
                       long gracePeriodSeconds,
                       T item,
                       boolean dryRun)
        Delete the specified resource (if exists).
        Parameters:
        client - An instance of the http client.
        config - The client config.
        namespace - The target namespace.
        propagationPolicy - Whether and how garbage collection will be performed.
        gracePeriodSeconds - The duration in seconds before the object should be deleted.
        item - The resource to delete.
        dryRun - enable dry run
        Returns:
        The true if the resource was successfully deleted.
      • watch

        Watch watch​(okhttp3.OkHttpClient client,
                    Config config,
                    String namespace,
                    T item,
                    Watcher<T> watcher)
        Watches the specified resource for changes.
        Parameters:
        client - An instance of the http client.
        config - The client config.
        namespace - The target namespace.
        item - The resource to delete.
        watcher - The Watcher to use.
        Returns:
        The Watch
      • watch

        Watch watch​(okhttp3.OkHttpClient client,
                    Config config,
                    String namespace,
                    T item,
                    String resourceVersion,
                    Watcher<T> watcher)
        Watches the specified resource for changes.
        Parameters:
        client - An instance of the http client.
        config - The client config.
        namespace - The target namespace.
        item - The resource to delete.
        resourceVersion - The resourceVersion of object
        watcher - The Watcher to use.
        Returns:
        The Watch
      • watch

        Watch watch​(okhttp3.OkHttpClient client,
                    Config config,
                    String namespace,
                    T item,
                    io.fabric8.kubernetes.api.model.ListOptions listOptions,
                    Watcher<T> watcher)
        Watches the specified resource for changes
        Parameters:
        client - An instance of http client.
        config - The client config.
        namespace - The target namespace.
        item - The resource to delete.
        listOptions - The ListOptions for available options
        watcher - The Watcher to use.
        Returns:
        The Watch
      • waitUntilReady

        T waitUntilReady​(okhttp3.OkHttpClient client,
                         Config config,
                         String namespace,
                         T item,
                         long amount,
                         TimeUnit timeUnit)
                  throws InterruptedException
        Waits until the specified resource is Ready. For resources that 'readiness' is not applicable the method is equivalent to get.
        Parameters:
        client - An instance of the http client.
        config - The client config.
        namespace - The target namespace.
        item - The resource to wait.
        amount - The amount of time to wait
        timeUnit - The wait TimeUnit.
        Returns:
        The true if the resource was successfully deleted.
        Throws:
        InterruptedException - Interrupted Exception