|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.timeindexing.cache.DefaultIndexCache
The default implementation of a cache which holds the index items.
| Constructor Summary | |
DefaultIndexCache(ManagedIndex index)
Create a DefaultIndexCache object. |
|
| Method Summary | |
long |
addItem(IndexItem item,
long position)
Add an Index Item to the Index. |
long |
addItem(IndexItem item,
Position position)
Add an Index Item to the Index. |
boolean |
clear()
Clear the whole cache This does nothing by default as the data will be lost. |
boolean |
containsItem(long pos)
Contains the IndexItem at the speicifed position. |
boolean |
containsItem(Position p)
Contains the IndexItem at the speicifed position. |
long |
getDataVolume()
Get the current data volume held by IndexItems in this cache. |
Timestamp |
getFirstDataTime()
Get the time the first IndexItem was put into the Index. |
Timestamp |
getFirstIndexTime()
Get the time the first IndexItem was put into the Index. |
IndexItem |
getItem(long pos)
Get an Index Item from the Index. |
IndexItem |
getItem(Position p)
Get an Index Item from the Index. |
Timestamp |
getLastDataTime()
Get the time the last IndexItem was put into the Index. |
Timestamp |
getLastIndexTime()
Get the time the last IndexItem was put into the Index. |
CachePolicy |
getPolicy()
Get the current cache policy. |
boolean |
hollowItem(long pos)
Hollow the IndexItem at the position. |
boolean |
hollowItem(Position p)
Hollow the IndexItem at the position. |
boolean |
removeItem(long pos)
Remove the IndexItem at the speicifed position. |
boolean |
removeItem(Position p)
Remove the IndexItem at the speicifed position. |
CachePolicy |
setPolicy(CachePolicy pol)
Set the cache policy. |
long |
size()
Get the no of items in the cache |
protected long |
sparce(long start,
long end)
Create some sparce elements in the cache. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultIndexCache(ManagedIndex index)
| Method Detail |
public long size()
size in interface IndexCache
public long addItem(IndexItem item,
Position position)
addItem in interface IndexCacheitem - the IndexItem to add
public long addItem(IndexItem item,
long position)
addItem in interface IndexCacheitem - the IndexItem to add
public IndexItem getItem(long pos)
getItem in interface IndexCachepublic IndexItem getItem(Position p)
getItem in interface IndexCachepublic boolean containsItem(long pos)
containsItem in interface IndexCachepublic boolean containsItem(Position p)
containsItem in interface IndexCachepublic boolean hollowItem(long pos)
hollowItem in interface IndexCachepublic boolean hollowItem(Position p)
hollowItem in interface IndexCachepublic boolean removeItem(long pos)
removeItem in interface IndexCachepublic boolean removeItem(Position p)
removeItem in interface IndexCachepublic boolean clear()
clear in interface IndexCachepublic long getDataVolume()
getDataVolume in interface IndexCachepublic Timestamp getFirstIndexTime()
getFirstIndexTime in interface IndexCachepublic Timestamp getLastIndexTime()
getLastIndexTime in interface IndexCachepublic Timestamp getFirstDataTime()
getFirstDataTime in interface IndexCachepublic Timestamp getLastDataTime()
getLastDataTime in interface IndexCachepublic CachePolicy setPolicy(CachePolicy pol)
setPolicy in interface IndexCachepublic CachePolicy getPolicy()
getPolicy in interface IndexCache
protected long sparce(long start,
long end)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||