blob: b43ac96839fe9792e546d9e442ff6186a3f14880 [file] [log] [blame]
package brooklyn.internal.storage;
import java.util.concurrent.ConcurrentMap;
public interface DataGrid {
<S,T> void registerSerializer(Serializer<S,T> serializer, Class<S> originalClazz, Class<T> serializedClazz);
/**
* If a map already exists with this id, returns it; otherwise creates a new map stored
* in the datagrid.
*/
<K,V> ConcurrentMap<K,V> getMap(String id);
/**
* Deletes the map for this id, if it exists; otherwise a no-op.
*/
void remove(String id);
/**
* Terminates the DataGrid. If there is a real datagrid with multiple machines running, it doesn't mean that the
* datagrid is going to be terminated; it only means that all local resources of the datagrid are released.
*/
void terminate();
}