|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SegmentCache
SPI definition of the segments cache.
Lookups are performed using SegmentHeaders and
SegmentBodys. Both are immutable and fully serializable.
Implementations are expected to be thread-safe. It is the responsibility of the cache implementation to maintain a consistent state.
Implementations must provide a default empty constructor.
Segment caches are instantiated as a singleton but can be
hot swapped by modifying MondrianProperties.SegmentCache.
Implementations will get a termination signal through
tearDown() but Mondrian will relinquish
control of the termination thread and will not be listening
to thrown exceptions.
MondrianProperties.SegmentCache![]() |
![]() |
| Method Summary | |
|---|---|
Future<Boolean> |
contains(SegmentHeader header)
Checks if the cache contains a SegmentBody corresponding
to the supplied SegmentHeader. |
Future<SegmentBody> |
get(SegmentHeader header)
Returns a future SegmentBody object once the cache has returned any results, or null of no segment corresponding to the header could be found. |
Future<List<SegmentHeader>> |
getSegmentHeaders()
Returns a list of all segments present in the cache. |
Future<Boolean> |
put(SegmentHeader header,
SegmentBody body)
Stores a segment data in the cache. |
void |
tearDown()
Tear down and clean up the cache. |
| Method Detail |
|---|
Future<SegmentBody> get(SegmentHeader header)
header - The header of the segment to find.
Consider this as a key.
null
if no corresponding segment could be found in cache.Future<Boolean> contains(SegmentHeader header)
SegmentBody corresponding
to the supplied SegmentHeader.
header - A header to lookup in the cache.
Future<List<SegmentHeader>> getSegmentHeaders()
Future<Boolean> put(SegmentHeader header,
SegmentBody body)
header - The header of the segment.body - The segment body to cache.
void tearDown()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||