- java.lang.Object
-
- swim.db.Store
-
- swim.db.FileStore
-
public class FileStore extends Store
-
-
Constructor Summary
Constructors Constructor Description FileStore(File directory, String baseName, Stage stage)
FileStore(File basePath, Stage stage)
FileStore(String basePath, Stage stage)
FileStore(StoreContext context, File directory, String baseName, Stage stage)
FileStore(StoreContext context, File basePath, Stage stage)
FileStore(StoreContext context, String basePath, Stage stage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
baseName()
boolean
close()
void
commitAsync(Commit commit)
Database
database()
boolean
delete()
void
deletePost(int post)
protected void
didClose()
Lifecycle callback invoked upon entering the closed state.protected void
didOpen()
Lifecycle callback invoked upon entering the opened state.File
directory()
boolean
isCommitting()
boolean
isCompacting()
int
newestZoneId()
int
oldestZoneId()
protected void
onClose()
Lifecycle callback invoked to actually close the store.protected void
onOpen()
Lifecycle callback invoked to actually open the store.boolean
open()
Database
openDatabase()
PageLoader
openPageLoader(TreeDelegate treeDelegate, boolean isResident)
protected Zone
openZone()
FileZone
openZone(int zoneId)
HashGenCacheSet<Page>
pageCache()
FileZone
shiftZone()
long
size()
Stage
stage()
StoreContext
storeContext()
protected void
willClose()
Lifecycle callback invoked upon entering the closing state.protected void
willOpen()
Lifecycle callback invoked upon entering the opening state.FileZone
zone()
FileZone
zone(int zoneId)
protected File
zoneFile(int zone)
String
zoneFileExt()
protected TreeMap<Integer,File>
zoneFiles()
-
-
-
Constructor Detail
-
FileStore
public FileStore(StoreContext context, File directory, String baseName, Stage stage)
-
FileStore
public FileStore(StoreContext context, File basePath, Stage stage)
-
FileStore
public FileStore(StoreContext context, String basePath, Stage stage)
-
-
Method Detail
-
storeContext
public final StoreContext storeContext()
- Specified by:
storeContext
in classStore
-
directory
public final File directory()
-
baseName
public final String baseName()
-
zoneFileExt
public final String zoneFileExt()
-
pageCache
public final HashGenCacheSet<Page> pageCache()
-
isCommitting
public final boolean isCommitting()
- Specified by:
isCommitting
in classStore
-
isCompacting
public final boolean isCompacting()
- Specified by:
isCompacting
in classStore
-
willOpen
protected void willOpen()
Lifecycle callback invoked upon entering the opening state.
-
onOpen
protected void onOpen()
Lifecycle callback invoked to actually open the store.
-
didOpen
protected void didOpen()
Lifecycle callback invoked upon entering the opened state.
-
willClose
protected void willClose()
Lifecycle callback invoked upon entering the closing state.
-
onClose
protected void onClose()
Lifecycle callback invoked to actually close the store.
-
didClose
protected void didClose()
Lifecycle callback invoked upon entering the closed state.
-
oldestZoneId
public int oldestZoneId()
- Specified by:
oldestZoneId
in classStore
-
newestZoneId
public int newestZoneId()
- Specified by:
newestZoneId
in classStore
-
openZone
protected Zone openZone()
-
deletePost
public void deletePost(int post)
- Specified by:
deletePost
in classStore
-
delete
public boolean delete()
-
openDatabase
public Database openDatabase()
- Specified by:
openDatabase
in classStore
-
openPageLoader
public PageLoader openPageLoader(TreeDelegate treeDelegate, boolean isResident)
- Specified by:
openPageLoader
in classStore
-
commitAsync
public void commitAsync(Commit commit)
- Specified by:
commitAsync
in classStore
-
zoneFile
protected File zoneFile(int zone)
-
-