public class FileManager
extends java.lang.Object
Constructor and Description |
---|
FileManager(BlueSerializer serializer) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(java.nio.file.Path path) |
<T> BlueObjectInput<T> |
getBlueInputStream(BlueReadLock<java.nio.file.Path> readLock) |
<T> BlueObjectOutput<T> |
getBlueOutputStream(BlueWriteLock<java.nio.file.Path> writeLock) |
LockManager<java.nio.file.Path> |
getLockManager() |
BlueReadLock<java.nio.file.Path> |
getReadLockIfFileExists(java.nio.file.Path path) |
java.lang.Object |
loadObject(BlueReadLock<java.nio.file.Path> readLock) |
java.lang.Object |
loadObject(java.io.File file) |
java.lang.Object |
loadObject(java.nio.file.Path path) |
void |
lockDeleteUnlock(java.io.File file) |
void |
lockMoveFileUnlock(java.nio.file.Path src,
java.nio.file.Path dst) |
protected byte[] |
readBytes(BlueReadLock<java.nio.file.Path> readLock) |
protected byte[] |
readBytes(java.nio.file.Path path) |
void |
saveObject(java.nio.file.Path path,
java.lang.Object o) |
protected void |
writeBytes(BlueWriteLock<java.nio.file.Path> writeLock,
byte[] bytes) |
public FileManager(BlueSerializer serializer)
public java.lang.Object loadObject(BlueReadLock<java.nio.file.Path> readLock) throws BlueDbException
BlueDbException
public java.lang.Object loadObject(java.io.File file) throws BlueDbException
BlueDbException
public java.lang.Object loadObject(java.nio.file.Path path) throws BlueDbException
BlueDbException
public void saveObject(java.nio.file.Path path, java.lang.Object o) throws BlueDbException
BlueDbException
public void lockMoveFileUnlock(java.nio.file.Path src, java.nio.file.Path dst) throws BlueDbException
BlueDbException
public void lockDeleteUnlock(java.io.File file)
public <T> BlueObjectOutput<T> getBlueOutputStream(BlueWriteLock<java.nio.file.Path> writeLock) throws BlueDbException
BlueDbException
public <T> BlueObjectInput<T> getBlueInputStream(BlueReadLock<java.nio.file.Path> readLock) throws BlueDbException
BlueDbException
public BlueReadLock<java.nio.file.Path> getReadLockIfFileExists(java.nio.file.Path path) throws BlueDbException
BlueDbException
public boolean exists(java.nio.file.Path path)
public LockManager<java.nio.file.Path> getLockManager()
protected byte[] readBytes(BlueReadLock<java.nio.file.Path> readLock) throws BlueDbException
BlueDbException
protected byte[] readBytes(java.nio.file.Path path) throws BlueDbException
BlueDbException
protected void writeBytes(BlueWriteLock<java.nio.file.Path> writeLock, byte[] bytes) throws BlueDbException
BlueDbException