public abstract class StateCache<T>
extends java.lang.Object
Constructor and Description |
---|
StateCache(java.io.File storePath) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
force() |
T |
getState(java.lang.String url) |
java.util.Collection<java.lang.String> |
getUrls() |
java.util.Iterator<java.lang.String> |
getUrlsIterator() |
protected abstract T |
read(java.io.DataInput stream) |
void |
remove(java.lang.String url) |
void |
update(java.lang.String url,
T state) |
boolean |
wipe() |
protected abstract void |
write(T t,
java.io.DataOutput out) |
public StateCache(java.io.File storePath) throws java.io.IOException
java.io.IOException
protected abstract T read(java.io.DataInput stream) throws java.io.IOException
java.io.IOException
protected abstract void write(T t, java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public void force()
public void close() throws java.io.IOException
java.io.IOException
public boolean wipe()
public void update(java.lang.String url, T state) throws java.io.IOException
java.io.IOException
public void remove(java.lang.String url) throws java.io.IOException
java.io.IOException
public T getState(java.lang.String url) throws java.io.IOException
java.io.IOException
public java.util.Collection<java.lang.String> getUrls() throws java.io.IOException
java.io.IOException
public java.util.Iterator<java.lang.String> getUrlsIterator() throws java.io.IOException
java.io.IOException