public abstract class AbstractOpenFileState extends Object implements OpenFileState
The GNU Lesser General Public License for details.| Modifier and Type | Field and Description |
|---|---|
private BookMetaData |
bookMetaData
The BookMetaData for this OpenFileState.
|
private long |
lastAccess
The time of last access, used for LRU expiration of state.
|
| Constructor and Description |
|---|
AbstractOpenFileState(BookMetaData bmd)
Create an AbstractOpenFileState tied to a BookMetaData.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Allows us to decide whether to release the resources or continue using them
|
BookMetaData |
getBookMetaData()
Get the BookMetaData for this OpenFileState.
|
long |
getLastAccess() |
void |
setLastAccess(long lastAccess)
Sets the last access time
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleaseResourcesprivate BookMetaData bookMetaData
private long lastAccess
public AbstractOpenFileState(BookMetaData bmd)
bmd - the BookMetaData for this OpenFileStatepublic void close()
close in interface Closeableclose in interface AutoCloseablepublic BookMetaData getBookMetaData()
getBookMetaData in interface OpenFileStatepublic long getLastAccess()
getLastAccess in interface OpenFileStatepublic void setLastAccess(long lastAccess)
OpenFileStatesetLastAccess in interface OpenFileStatelastAccess - last time the file state was accessed