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, wait
releaseResources
private BookMetaData bookMetaData
private long lastAccess
public AbstractOpenFileState(BookMetaData bmd)
bmd
- the BookMetaData for this OpenFileStatepublic void close()
close
in interface Closeable
close
in interface AutoCloseable
public BookMetaData getBookMetaData()
getBookMetaData
in interface OpenFileState
public long getLastAccess()
getLastAccess
in interface OpenFileState
public void setLastAccess(long lastAccess)
OpenFileState
setLastAccess
in interface OpenFileState
lastAccess
- last time the file state was accessed