backtype.storm.utils
Class LocalState
java.lang.Object
backtype.storm.utils.LocalState
public class LocalState
- extends Object
A simple, durable, atomic K/V database. *Very inefficient*, should only be used for occasional reads/writes.
Every read/write hits disk.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalState
public LocalState(String backingDir)
throws IOException
- Throws:
IOException
snapshot
public Map<Object,Object> snapshot()
throws IOException
- Throws:
IOException
get
public Object get(Object key)
throws IOException
- Throws:
IOException
put
public void put(Object key,
Object val)
throws IOException
- Throws:
IOException
put
public void put(Object key,
Object val,
boolean cleanup)
throws IOException
- Throws:
IOException
remove
public void remove(Object key)
throws IOException
- Throws:
IOException
remove
public void remove(Object key,
boolean cleanup)
throws IOException
- Throws:
IOException
cleanup
public void cleanup(int keepVersions)
throws IOException
- Throws:
IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.