public class LocalFileSystemStore
extends java.lang.Object
| Constructor and Description |
|---|
LocalFileSystemStore()
Creates a new storage service on the local file system using default Java serialization.
|
LocalFileSystemStore(SerializationService serial)
Creates a new storage service on the local file system using the given serializer.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
recall(java.io.File file,
java.lang.Class<T> type)
Returns the object stored in the local file system at the given file location.
|
<T> T |
recall(java.lang.String path,
java.lang.Class<T> type)
Returns the object stored in the local file system at the given path.
|
void |
setSerializer(SerializationService service) |
void |
store(java.io.File file,
Storable obj)
Stores the given object at the given file location.
|
void |
store(java.lang.String path,
Storable obj)
Stores the given object at the given path.
|
public LocalFileSystemStore()
public LocalFileSystemStore(SerializationService serial)
public void store(java.lang.String path,
Storable obj)
throws java.io.IOException
path - The local file system path.obj - The object to store.java.io.IOException - If a problem occurs storing the object.public void store(java.io.File file,
Storable obj)
throws java.io.IOException
file - The local file system location to store the object.obj - The object to store.java.io.IOException - If a problem occurs storing the object.public <T> T recall(java.lang.String path,
java.lang.Class<T> type)
throws java.io.IOException
path - The local file system path.type - The type of object being retrieved.java.io.IOException - If a problem occurs retrieving the object.public <T> T recall(java.io.File file,
java.lang.Class<T> type)
throws java.io.IOException
file - The local file system location.type - The type of object being retrieved.java.io.IOException - If a problem occurs retrieving the object.public void setSerializer(SerializationService service)