public class LocalFileStateStore extends java.lang.Object implements StateStore
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHECKPOINTING_STORE_FS_DIR |
Constructor and Description |
---|
LocalFileStateStore() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.String key)
Check weather the specified key is in the store
|
byte[] |
get(java.lang.String key)
Get the bye value of the key
|
void |
init(Config config,
java.lang.String... path)
Initialize the store
|
void |
put(java.lang.String key,
byte[] data)
Put a key and data
|
public static final java.lang.String CHECKPOINTING_STORE_FS_DIR
public void init(Config config, java.lang.String... path)
StateStore
init
in interface StateStore
config
- configurationpath
- pathpublic void put(java.lang.String key, byte[] data) throws java.io.IOException
StateStore
put
in interface StateStore
key
- keydata
- datajava.io.IOException
- if an error occurspublic byte[] get(java.lang.String key) throws java.io.IOException
StateStore
get
in interface StateStore
key
- keyjava.io.IOException
- if an error occurspublic boolean contains(java.lang.String key) throws java.io.IOException
StateStore
contains
in interface StateStore
key
- keyjava.io.IOException
- if an error occurs