All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.synedge.oss.client.InvalidationClient Maven / Gradle / Ivy

Go to download

This client allows you to easily connect to the Synedge API with any language running on the JDK

The newest version!
package com.synedge.oss.client;

import com.synedge.oss.client.exceptions.SynedgeClientInvalidationException;
import com.synedge.oss.client.invalidation.Invalidation;
import com.synedge.oss.client.invalidation.Invalidations;


/**
 * Client for sending invalidations to the CDN
 * 
 * @author Paul van Assen
 *
 */
public interface InvalidationClient {
    /**
     * The invalidate call accepts a list of URLs. All url's are checked to see if the domain matches the supplied customer.
     *
     * It is not possible to invalidate files across different customers.
     *
     * @param customerId Customer id as can be found in the getCustomers call
     * @param urls Urls of files to invalidate.
     * @throws SynedgeClientInvalidationException May throw SynedgeClientInvalidationException if an error occured on the server side.
     * @return The id of the invalidation just attempted. With the getInvalidation call the status can be retrieved.  
     */
    String invalidate(String customerId, Iterable urls) throws SynedgeClientInvalidationException;
    
    /**
     * Get all previous invalidations with their statuses
     * @param customerId Customer id
     * @param start 0 based start counter
     * @param count The maximum number of results to return. Be aware, the API can maximize the count for performance reasons. The actual count is returned in the invalidation object
     * @return An object holding start, count and a list of invalidations
     */
    Invalidations getInvalidations(String customerId, int start, int count);
    
    /**
     * Get one specific invalidation or null if not exists
     * @param customerId Customer id
     * @param invalidationId The id of one specific invalidation
     * @return One invalidation, the same object as returned in the list of getInvalidations, for the specified id, or null if the invalidation was not found. 
     */
    Invalidation getInvalidation(String customerId, String invalidationId);
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy