// Path: waterfallcache/src/main/java/com/github/simonpercic/waterfallcache/callback/WaterfallCallback.java
// public interface WaterfallCallback extends WaterfallFailureCallback {
// 
//     /**
//      * Called on success.
//      */
//     void onSuccess();
// }
// 
// Path: waterfallcache/src/main/java/com/github/simonpercic/waterfallcache/callback/WaterfallGetCallback.java
// public interface WaterfallGetCallback<T> extends WaterfallFailureCallback {
// 
//     /**
//      * Called on success. Returns the value.
//      *
//      * @param object returned object
//      */
//     void onSuccess(T object);
// }


import com.github.simonpercic.waterfallcache.callback.WaterfallCallback;
import com.github.simonpercic.waterfallcache.callback.WaterfallGetCallback;
import java.lang.reflect.Type;
package com.github.simonpercic.waterfallcache.cache;



/**
 * @author Simon Percic <a href="https://github.com/simonpercic">https://github.com/simonpercic</a>
 */
public interface AsyncCache {

    /**
     * Get from cache - async, using a callback.
     *
     * @param key key
     * @param typeOfT type of cache value
     * @param callback callback that will be invoked to return the value
     * @param <T> T of cache value
     */
    <T> void getAsync(String key, Type typeOfT, WaterfallGetCallback<T> callback);

    /**
     * Put value to cache - async, using a callback.
     *
     * @param key key
     * @param object object
     * @param callback callback that will be invoked to report status
     */
// Path: waterfallcache/src/main/java/com/github/simonpercic/waterfallcache/callback/WaterfallCallback.java
// public interface WaterfallCallback extends WaterfallFailureCallback {
// 
//     /**
//      * Called on success.
//      */
//     void onSuccess();
// }
// 
// Path: waterfallcache/src/main/java/com/github/simonpercic/waterfallcache/callback/WaterfallGetCallback.java
// public interface WaterfallGetCallback<T> extends WaterfallFailureCallback {
// 
//     /**
//      * Called on success. Returns the value.
//      *
//      * @param object returned object
//      */
//     void onSuccess(T object);
// }


// Path: waterfallcache/src/main/java/com/github/simonpercic/waterfallcache/cache/AsyncCache.java
import com.github.simonpercic.waterfallcache.callback.WaterfallCallback;
import com.github.simonpercic.waterfallcache.callback.WaterfallGetCallback;
import java.lang.reflect.Type;

package com.github.simonpercic.waterfallcache.cache;



/**
 * @author Simon Percic <a href="https://github.com/simonpercic">https://github.com/simonpercic</a>
 */
public interface AsyncCache {

    /**
     * Get from cache - async, using a callback.
     *
     * @param key key
     * @param typeOfT type of cache value
     * @param callback callback that will be invoked to return the value
     * @param <T> T of cache value
     */
    <T> void getAsync(String key, Type typeOfT, WaterfallGetCallback<T> callback);

    /**
     * Put value to cache - async, using a callback.
     *
     * @param key key
     * @param object object
     * @param callback callback that will be invoked to report status
     */
    void putAsync(String key, Object object, WaterfallCallback callback);