Interface ClusterService


public interface ClusterService
An interface that provides all methods needed for the Genie cluster client implementation.
Since:
3.0.0
  • Field Details

  • Method Details

    • createCluster

      @POST("/api/v3/clusters") retrofit2.Call<Void> createCluster(@Body Cluster cluster)
      Method to create a cluster in Genie.
      Parameters:
      cluster - The cluster object.
      Returns:
      A callable object.
    • updateCluster

      @PUT("/api/v3/clusters/{id}") retrofit2.Call<Void> updateCluster(@Path("id") String clusterId, @Body Cluster cluster)
      Method to update a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster to update.
      cluster - The cluster object.
      Returns:
      A callable object.
    • getClusters

      @GET("/api/v3/clusters") retrofit2.Call<com.fasterxml.jackson.databind.JsonNode> getClusters(@Query("name") String name, @Query("status") List<String> statusList, @Query("tag") List<String> tagList, @Query("minUpdateTime") Long minUpdateTime, @Query("maxUpdateTime") Long maxUpdateTime, @Query("size") Integer size, @Query("sort") String sort, @Query("page") Integer page)
      Method to get clusters from Genie based on filters specified.
      Parameters:
      name - The name of the cluster.
      statusList - The list of statuses.
      tagList - The list of tags.
      minUpdateTime - Minimum Time after which cluster was updated.
      maxUpdateTime - Maximum Time before which cluster was updated.
      size - The maximum number of results in the page
      sort - The sort order
      page - The page index
      Returns:
      A callable object.
    • getCluster

      @GET("/api/v3/clusters/{id}") retrofit2.Call<Cluster> getCluster(@Path("id") String clusterId)
      Method to fetch a single job from Genie.
      Parameters:
      clusterId - The id of the cluster to get.
      Returns:
      A callable object.
    • deleteCluster

      @DELETE("/api/v3/clusters/{id}") retrofit2.Call<Void> deleteCluster(@Path("id") String clusterId)
      Method to delete a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      Returns:
      A callable object.
    • deleteAllClusters

      @DELETE("/api/v3/clusters") retrofit2.Call<Void> deleteAllClusters()
      Method to delete all clusters in Genie.
      Returns:
      A callable object.
    • patchCluster

      @PATCH("/api/v3/clusters/{id}") retrofit2.Call<Void> patchCluster(@Path("id") String clusterId, @Body com.github.fge.jsonpatch.JsonPatch patch)
      Patch a cluster using JSON Patch.
      Parameters:
      clusterId - The id of the cluster to patch
      patch - The JSON Patch instructions
      Returns:
      A callable object.
    • getCommandsForCluster

      @GET("/api/v3/clusters/{id}/commands") retrofit2.Call<List<Command>> getCommandsForCluster(@Path("id") String clusterId)
      Method to get commmands for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      Returns:
      A callable object.
    • addCommandsToCluster

      @POST("/api/v3/clusters/{id}/commands") retrofit2.Call<Void> addCommandsToCluster(@Path("id") String clusterId, @Body List<String> commandIds)
      Method to add commands to a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster..
      commandIds - The command Ids to be added.
      Returns:
      A callable object.
    • setCommandsForCluster

      @PUT("/api/v3/clusters/{id}/commands") retrofit2.Call<Void> setCommandsForCluster(@Path("id") String clusterId, @Body List<String> commandIds)
      Method to override and set commands for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster..
      commandIds - The command Ids to be added.
      Returns:
      A callable object.
    • removeCommandForCluster

      @DELETE("/api/v3/clusters/{id}/commands/{commandId}") retrofit2.Call<Void> removeCommandForCluster(@Path("id") String clusterId, @Path("commandId") String commandId)
      Method to delete a command for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      commandId - The command to delete.
      Returns:
      A callable object.
    • removeAllCommandsForCluster

      @DELETE("/api/v3/clusters/{id}/commands") retrofit2.Call<Void> removeAllCommandsForCluster(@Path("id") String clusterId)
      Method to delete all commands for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      Returns:
      A callable object.
    • getDependenciesForCluster

      @GET("/api/v3/clusters/{id}/dependencies") retrofit2.Call<Set<String>> getDependenciesForCluster(@Path("id") String clusterId)
      Method to get dependency files for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      Returns:
      A callable object.
    • addDependenciesToCluster

      @POST("/api/v3/clusters/{id}/dependencies") retrofit2.Call<Void> addDependenciesToCluster(@Path("id") String clusterId, @Body Set<String> dependencies)
      Method to add dependencies to a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster..
      dependencies - The dependencies to be added.
      Returns:
      A callable object.
    • updateDependenciesForCluster

      @PUT("/api/v3/clusters/{id}/dependencies") retrofit2.Call<Void> updateDependenciesForCluster(@Path("id") String clusterId, @Body Set<String> dependencies)
      Method to update dependencies for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster..
      dependencies - The dependencies to be added.
      Returns:
      A callable object.
    • removeAllDependenciesForCluster

      @DELETE("/api/v3/clusters/{id}/dependencies") retrofit2.Call<Void> removeAllDependenciesForCluster(@Path("id") String clusterId)
      Method to delete all dependencies for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      Returns:
      A callable object.
    • getConfigsForCluster

      @GET("/api/v3/clusters/{id}/configs") retrofit2.Call<Set<String>> getConfigsForCluster(@Path("id") String clusterId)
      Method to get configs for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      Returns:
      A callable object.
    • addConfigsToCluster

      @POST("/api/v3/clusters/{id}/configs") retrofit2.Call<Void> addConfigsToCluster(@Path("id") String clusterId, @Body Set<String> configs)
      Method to add configs to a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster..
      configs - The configs to be added.
      Returns:
      A callable object.
    • updateConfigsForCluster

      @PUT("/api/v3/clusters/{id}/configs") retrofit2.Call<Void> updateConfigsForCluster(@Path("id") String clusterId, @Body Set<String> configs)
      Method to update configs for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster..
      configs - The configs to be added.
      Returns:
      A callable object.
    • removeAllConfigsForCluster

      @DELETE("/api/v3/clusters/{id}/configs") retrofit2.Call<Void> removeAllConfigsForCluster(@Path("id") String clusterId)
      Method to delete all configs for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      Returns:
      A callable object.
    • getTagsForCluster

      @GET("/api/v3/clusters/{id}/tags") retrofit2.Call<Set<String>> getTagsForCluster(@Path("id") String clusterId)
      Method to get tags for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      Returns:
      A callable object.
    • addTagsToCluster

      @POST("/api/v3/clusters/{id}/tags") retrofit2.Call<Void> addTagsToCluster(@Path("id") String clusterId, @Body Set<String> tags)
      Method to add tags to a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster..
      tags - The tags to be added.
      Returns:
      A callable object.
    • updateTagsForCluster

      @PUT("/api/v3/clusters/{id}/tags") retrofit2.Call<Void> updateTagsForCluster(@Path("id") String clusterId, @Body Set<String> tags)
      Method to update tags for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster..
      tags - The tags to be added.
      Returns:
      A callable object.
    • removeTagForCluster

      @DELETE("/api/v3/clusters/{id}/tags/{tag}") retrofit2.Call<Void> removeTagForCluster(@Path("id") String clusterId, @Path("tag") String tag)
      Method to delete a tag for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      tag - The tag to delete.
      Returns:
      A callable object.
    • removeAllTagsForCluster

      @DELETE("/api/v3/clusters/{id}/tags") retrofit2.Call<Void> removeAllTagsForCluster(@Path("id") String clusterId)
      Method to delete all tags for a cluster in Genie.
      Parameters:
      clusterId - The id of the cluster.
      Returns:
      A callable object.