- 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 StringbaseName()booleanclose()voidcommitAsync(Commit commit)Databasedatabase()booleandelete()voiddeletePost(int post)protected voiddidClose()Lifecycle callback invoked upon entering the closed state.protected voiddidOpen()Lifecycle callback invoked upon entering the opened state.Filedirectory()booleanisCommitting()booleanisCompacting()intnewestZoneId()intoldestZoneId()protected voidonClose()Lifecycle callback invoked to actually close the store.protected voidonOpen()Lifecycle callback invoked to actually open the store.booleanopen()DatabaseopenDatabase()PageLoaderopenPageLoader(TreeDelegate treeDelegate, boolean isResident)protected ZoneopenZone()FileZoneopenZone(int zoneId)HashGenCacheSet<Page>pageCache()FileZoneshiftZone()longsize()Stagestage()StoreContextstoreContext()protected voidwillClose()Lifecycle callback invoked upon entering the closing state.protected voidwillOpen()Lifecycle callback invoked upon entering the opening state.FileZonezone()FileZonezone(int zoneId)protected FilezoneFile(int zone)StringzoneFileExt()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:
storeContextin 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:
isCommittingin classStore
-
isCompacting
public final boolean isCompacting()
- Specified by:
isCompactingin 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:
oldestZoneIdin classStore
-
newestZoneId
public int newestZoneId()
- Specified by:
newestZoneIdin classStore
-
openZone
protected Zone openZone()
-
deletePost
public void deletePost(int post)
- Specified by:
deletePostin classStore
-
delete
public boolean delete()
-
openDatabase
public Database openDatabase()
- Specified by:
openDatabasein classStore
-
openPageLoader
public PageLoader openPageLoader(TreeDelegate treeDelegate, boolean isResident)
- Specified by:
openPageLoaderin classStore
-
commitAsync
public void commitAsync(Commit commit)
- Specified by:
commitAsyncin classStore
-
zoneFile
protected File zoneFile(int zone)
-
-