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

co.spraybot.messagerunner.DataStore Maven / Gradle / Ivy

Go to download

A micro-framework to allow easily passing specific Vert.x messages to specific addresses for processing of those messages.

The newest version!
package co.spraybot.messagerunner;

import io.vertx.core.Future;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;

/**
 * A facade that allows for CRUD operations interacting with the running DataStoreVerticle.
 *
 * @since 0.1.0
 */
public interface DataStore {

    /**
     * @param key The identifier for the data you want to store
     * @param value The contents that should be associated with the key
     * @return Whether or not the value was stored
     */
    Future storeData(String key, JsonArray value);

    /**
     * @param key The identifier for the data you want to store
     * @param value The contents that should be associated with the key
     * @return Whether or not the value was stored
     */
    Future storeData(String key, JsonObject value);

    /**
     * @param key The identifier for the data you want to store
     * @param value The contents that should be associated with the key
     * @return Whether or not the value was stored
     */
    Future storeData(String key, String value);

    /**
     * @param key The identifier for the data you want to store
     * @param value The contents that should be associated with the key
     * @return Whether or not the value was stored
     */
    Future storeData(String key, int value);

    /**
     * @param key The identifier for the data you want to store
     * @param value The contents that should be associated with the key
     * @return Whether or not the value was stored
     */
    Future storeData(String key, double value);

    /**
     * @param key The identifier for the data you want to store
     * @param value The contents that should be associated with the key
     * @return Whether or not the value was stored
     */
    Future storeData(String key, boolean value);

    /**
     * @param key The identifier used to storeData
     * @param  The type of data the value for key was stored as
     * @return The value identified by key
     */
     Future fetchData(String key);

    /**
     * @param key The HardDriveSector identifier you want to destroy
     * @return Simply resolve when completed or fail the Future
     */
    Future destroyData(String key);

    /**
     * Hugely destructive! Will cause the DataStoreVerticle to wipe all learned BrainNeurons.
     *
     * @return Simply resolve when completed or fail the Future
     */
    Future destroyAllData();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy