javastrava.cache.StravaCacheable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javastrava-api Show documentation
Show all versions of javastrava-api Show documentation
Java implementation of the Strava API
package javastrava.cache;
import javastrava.api.v3.model.reference.StravaResourceState;
/**
*
* Classes implementing {@link StravaCacheable} can be (unsurprisingly) cached via an appropriate {@link StravaCache} implementation.
*
*
* @author Dan Shannon
*
* @param The class of the identifier of the cacheable entity
*/
public interface StravaCacheable {
/**
* @return The identifier
*/
public T getId();
/**
* @return The resource state of the cacheable entity, used by caching mechanisms to work out whether or not to overwrite data in cache
*/
public StravaResourceState getResourceState();
}