org.compass.gps.device.jdbc.snapshot
Class FSJdbcSnapshotPersister

java.lang.Object
  extended by org.compass.gps.device.jdbc.snapshot.FSJdbcSnapshotPersister
All Implemented Interfaces:
JdbcSnapshotPersister

public class FSJdbcSnapshotPersister
extends Object
implements JdbcSnapshotPersister

A FS (File System) based snapshot persister. The persister will store and load the snapshot to the file system, using the given file path (using setPath(String)). The data will be saved using Java ObjectOutputStream, and loaded using ObjectInputStream.

Note that the path set is the path to the actual file that will be created.

Author:
kimchy

Constructor Summary
FSJdbcSnapshotPersister()
           
FSJdbcSnapshotPersister(String path)
           
 
Method Summary
 String getPath()
           
 JdbcSnapshot load()
          Loads the jdbc snapshot from the store.
 void save(JdbcSnapshot snapshot)
          Saves the jdbc snapshot to the store.
 void setPath(String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSJdbcSnapshotPersister

public FSJdbcSnapshotPersister()

FSJdbcSnapshotPersister

public FSJdbcSnapshotPersister(String path)
Method Detail

load

public JdbcSnapshot load()
                  throws JdbcGpsDeviceException
Description copied from interface: JdbcSnapshotPersister
Loads the jdbc snapshot from the store.

Specified by:
load in interface JdbcSnapshotPersister
Returns:
The jdbc snapshot
Throws:
JdbcGpsDeviceException

save

public void save(JdbcSnapshot snapshot)
          throws JdbcGpsDeviceException
Description copied from interface: JdbcSnapshotPersister
Saves the jdbc snapshot to the store.

Specified by:
save in interface JdbcSnapshotPersister
Throws:
JdbcGpsDeviceException

getPath

public String getPath()

setPath

public void setPath(String path)


Copyright (c) 2004-2009 The Compass Project.