public class FilePersistenceStrategy extends Object implements PersistenceStrategy
| Constructor and Description |
|---|
FilePersistenceStrategy(File file) |
| Modifier and Type | Method and Description |
|---|---|
Factorization |
load()
Load a factorization from a persistent store.
|
void |
maybePersist(Factorization factorization)
Write a factorization to a persistent store unless it already
contains an identical factorization.
|
static Factorization |
readBinary(DataInput in) |
protected static void |
writeBinary(Factorization factorization,
DataOutput out) |
public FilePersistenceStrategy(File file)
file - the file to use for storage. If the file does not exist it will be created when required.public Factorization load() throws IOException
PersistenceStrategyload in interface PersistenceStrategyIOExceptionpublic void maybePersist(Factorization factorization) throws IOException
PersistenceStrategymaybePersist in interface PersistenceStrategyIOExceptionprotected static void writeBinary(Factorization factorization, DataOutput out) throws IOException
IOExceptionpublic static Factorization readBinary(DataInput in) throws IOException
IOExceptionCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.