blob: cfae271411116d3fd47eb36507c919587b345b7d [file] [log] [blame]
Madan Jampani393e0f02015-02-12 07:35:39 +05301package org.onosproject.store.service;
2
3/**
4 * Storage service.
5 * <p>
6 * This service provides operations for creating key-value stores.
7 * One can chose to create key-value stores with varying properties such
8 * as strongly consistent vs eventually consistent, durable vs volatile.
9 * <p>
10 * Various store implementations should leverage the data structures provided
11 * by this service
12 */
13public interface StorageService {
14
15 /**
16 * Creates a ConsistentMap.
17 *
18 * @param name map name
19 * @param serializer serializer to use for serializing keys and values.
20 * @return consistent map.
21 * @param <K> key type
22 * @param <V> value type
23 */
24 <K, V> ConsistentMap<K , V> createConsistentMap(String name, Serializer serializer);
25
26 // TODO: add API for creating Eventually Consistent Map.
27}