Class ReconciliatorResource

java.lang.Object
io.clonecloudstore.reconciliator.server.resource.ReconciliatorResource

@Path("/reconciliator") public class ReconciliatorResource extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReconciliatorResource(PurgeService purgeService, LocalReconciliationService localReconciliationService, CentralReconciliationService centralReconciliationService, InitializationService initializationService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    Initial creation of Reconciliation Request
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    Local creation of Reconciliation Request from existing one in Central.
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    getActionsListing(String idRequest, String remoteId)
    Once all listing are done, Central will compute Actions and then inform through Replicator remote sites.
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    getImportStatus(String bucket, String idImport)
    Once all is done for an Import, can have its full status (statistic or whatever).
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    Once all is done for a Local Request, can have its full status (statistic or whatever).
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    Once all is done for a Purge, can have its full status (statistic or whatever).
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    Once all is done for a Request, can have its full status (statistic or whatever).
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    Once Local sites listing is ready, inform through Replicator and topic event the Central, then Central will request the listing from remote Local.
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    launchImport(String bucket, String clientId, long expiredInSeconds, String defaultMetadata)
    Perform local import actions.
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    launchPurge(String clientId, long expiredInSeconds)
    Perform local purge actions.
    io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response>
    launchSync(String bucket, String clientId, long targetSite)
    Perform Sync actions for an "empty" remote Site.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • createRequestCentral

      @POST @Path("/central/requests") @Consumes("application/json") @Produces("application/json") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> createRequestCentral(ReconciliationRequest request)
      Initial creation of Reconciliation Request

      Probably returns the object with Id abd Accepted status

    • getRequestStatus

      @GET @Path("/central/requests/{idRequest}") @Produces("application/json") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getRequestStatus(@PathParam("idRequest") String idRequest)
      Once all is done for a Request, can have its full status (statistic or whatever). May return not finished (206 Partial Content)
    • getActionsListing

      @GET @Path("/central/requests/{idRequest}/listing/{remoteId}") @Produces("application/octet-stream") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getActionsListing(@PathParam("idRequest") String idRequest, @PathParam("remoteId") String remoteId)
      Once all listing are done, Central will compute Actions and then inform through Replicator remote sites. Each one will ask for their own local actions. Those will be saved locally as final actions.
    • createRequestLocal

      @POST @Path("/local/requests") @Produces("application/json") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> createRequestLocal(ReconciliationRequest request)
      Local creation of Reconciliation Request from existing one in Central. Will run all local steps (1 to 5).

      If request is with purge, will clean nativeListing

      Probably returns with Accepted status

    • getLocalRequestStatus

      @GET @Path("/local/requests/{idRequest}") @Produces("application/json") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getLocalRequestStatus(@PathParam("idRequest") String idRequest)
      Once all is done for a Local Request, can have its full status (statistic or whatever). May return not finished (206 Partial Content)
    • getSitesListing

      @GET @Path("/local/requests/{idRequest}/listing") @Produces("application/octet-stream") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getSitesListing(@PathParam("idRequest") String idRequest)
      Once Local sites listing is ready, inform through Replicator and topic event the Central, then Central will request the listing from remote Local. Once all listing are done, Central will compute Actions.

      If request is with purge, will clean sitesListing

    • launchPurge

      @POST @Path("/purge") @Produces("application/json") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> launchPurge(@HeaderParam("x-clonecloudstore-client-id") String clientId, @HeaderParam("x-clonecloudstore-expired-seconds") long expiredInSeconds)
      Perform local purge actions.

      Probably returns an Id with Accepted status

    • getPurgeStatus

      @GET @Path("/purge/{idPurge}") @Produces("application/json") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getPurgeStatus(@PathParam("idPurge") String idPurge)
      Once all is done for a Purge, can have its full status (statistic or whatever). May return not finished (206 Partial Content)
    • launchImport

      @POST @Path("/import/{bucket}") @Produces("application/json") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> launchImport(@PathParam("bucket") String bucket, @HeaderParam("x-clonecloudstore-client-id") String clientId, @HeaderParam("x-clonecloudstore-expired-seconds") long expiredInSeconds, @HeaderParam("x-clonecloudstore-metadata") String defaultMetadata)
      Perform local import actions.

      Probably returns an Id with Accepted status

    • getImportStatus

      @GET @Path("/import/{bucket}/{idImport}") @Produces("application/json") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getImportStatus(@PathParam("bucket") String bucket, @PathParam("idImport") String idImport)
      Once all is done for an Import, can have its full status (statistic or whatever). May return not finished (206 Partial Content)
    • launchSync

      @POST @Path("/sync/{bucket}") @Produces("application/json") public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> launchSync(@PathParam("bucket") String bucket, @HeaderParam("x-clonecloudstore-client-id") String clientId, @HeaderParam("x-clonecloudstore-target-id") long targetSite)
      Perform Sync actions for an "empty" remote Site.

      Probably returns an Id of Request with Accepted status