krati.store
Interface DataStore<K,V>

Type Parameters:
K - key
V - value
All Superinterfaces:
Iterable<Map.Entry<K,V>>
All Known Subinterfaces:
ObjectStore<K,V>
All Known Implementing Classes:
DynamicDataStore, IndexedDataStore, ObjectStoreAgent, SerializableObjectStore, StaticDataStore

public interface DataStore<K,V>
extends Iterable<Map.Entry<K,V>>

Key Value Store.

Author:
jwu

Method Summary
 void clear()
           
 boolean delete(K key)
           
 V get(K key)
           
 Iterator<K> keyIterator()
           
 void persist()
           
 boolean put(K key, V value)
           
 void sync()
           
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

get

V get(K key)

put

boolean put(K key,
            V value)
            throws Exception
Throws:
Exception

delete

boolean delete(K key)
               throws Exception
Throws:
Exception

sync

void sync()
          throws IOException
Throws:
IOException

persist

void persist()
             throws IOException
Throws:
IOException

clear

void clear()
           throws IOException
Throws:
IOException

keyIterator

Iterator<K> keyIterator()


Copyright © 2011. All Rights Reserved.