|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.rolap.agg.MockSegmentCache
public class MockSegmentCache
Mock implementation of SegmentCache that is used for automated
testing.
It tries to marshall / unmarshall all SegmentHeader and
SegmentBody objects that are sent to it.
| Constructor Summary | |
|---|---|
MockSegmentCache()
|
|
| Method Summary | |
|---|---|
Future<Boolean> |
contains(SegmentHeader header)
Checks if the cache contains a SegmentBody corresponding
to the supplied SegmentHeader. |
Future<Boolean> |
flush(SegmentHeader.ConstrainedColumn[] region)
Flushes a dimensionality region from the cache. |
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. |
Future<Boolean> |
remove(SegmentHeader header)
Removes a segment from the cache. |
void |
tearDown()
Tear down and clean up the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockSegmentCache()
| Method Detail |
|---|
public Future<Boolean> contains(SegmentHeader header)
SegmentCacheSegmentBody corresponding
to the supplied SegmentHeader.
contains in interface SegmentCacheheader - A header to lookup in the cache.
public Future<SegmentBody> get(SegmentHeader header)
SegmentCache
get in interface SegmentCacheheader - The header of the segment to find.
Consider this as a key.
null
if no corresponding segment could be found in cache.
public Future<Boolean> put(SegmentHeader header,
SegmentBody body)
SegmentCache
put in interface SegmentCacheheader - The header of the segment.body - The segment body to cache.
public Future<List<SegmentHeader>> getSegmentHeaders()
SegmentCache
getSegmentHeaders in interface SegmentCachepublic Future<Boolean> remove(SegmentHeader header)
SegmentCache
remove in interface SegmentCacheheader - The header of the segment we want to remove.
public Future<Boolean> flush(SegmentHeader.ConstrainedColumn[] region)
SegmentCache
flush in interface SegmentCacheregion - The region to flush.
public void tearDown()
SegmentCache
tearDown in interface SegmentCache
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||