public class CacheControlImpl extends Object implements CacheControl
CacheControl API.| Modifier and Type | Class and Description |
|---|---|
static class |
CacheControlImpl.MemberSetVisitorImpl
Default implementation of
MemberSetVisitor. |
CacheControl.CellRegion, CacheControl.MemberEditCommand, CacheControl.MemberSet| Constructor and Description |
|---|
CacheControlImpl(RolapConnection connection)
Creates a CacheControlImpl.
|
| Modifier and Type | Method and Description |
|---|---|
CacheControl.MemberEditCommand |
createAddCommand(Member member)
Creates a command to add a member to the cache.
|
CacheControl.MemberEditCommand |
createCompoundCommand(CacheControl.MemberEditCommand... commands)
Builds a compound command which is executed atomically.
|
CacheControl.MemberEditCommand |
createCompoundCommand(List<CacheControl.MemberEditCommand> commandList)
Builds a compound command which is executed atomically.
|
CacheControl.CellRegion |
createCrossjoinRegion(CacheControl.CellRegion... regions)
Forms the cartesian product of two or more cell regions.
|
CacheControl.MemberEditCommand |
createDeleteCommand(CacheControl.MemberSet s)
Creates a command to delete a set of members from the member cache.
|
CacheControl.MemberEditCommand |
createDeleteCommand(Member member)
Creates a command to delete a member and its descendants from the member
cache.
|
CacheControl.CellRegion |
createMeasuresRegion(Cube cube)
Creates a region consisting of all measures in a given cube.
|
CacheControl.CellRegion |
createMemberRegion(boolean lowerInclusive,
Member lowerMember,
boolean upperInclusive,
Member upperMember,
boolean descendants)
Creates a cell region consisting of a range between two members.
|
CacheControl.CellRegion |
createMemberRegion(Member member,
boolean descendants)
Creates a cell region consisting of a single member.
|
CacheControl.MemberSet |
createMemberSet(boolean lowerInclusive,
Member lowerMember,
boolean upperInclusive,
Member upperMember,
boolean descendants)
Creates a member set consisting of a range between two members.
|
CacheControl.MemberSet |
createMemberSet(Member member,
boolean descendants)
Creates a member set containing either a single member, or a member and
its descendants.
|
CacheControl.MemberEditCommand |
createMoveCommand(Member member,
Member loc)
Creates a command to Move a member (with its descendants) to a new
location, that is to a new parent.
|
CacheControl.MemberEditCommand |
createSetPropertyCommand(CacheControl.MemberSet members,
Map<String,Object> propertyValues)
Creates a command to several properties changes over a set of
members.
|
CacheControl.MemberEditCommand |
createSetPropertyCommand(Member member,
String name,
Object value)
Creates a command to change one property of a member.
|
CacheControl.CellRegion |
createUnionRegion(CacheControl.CellRegion... regions)
Forms the union of two or more cell regions.
|
CacheControl.MemberSet |
createUnionSet(CacheControl.MemberSet... args)
Forms the union of two or more member sets.
|
void |
execute(CacheControl.MemberEditCommand cmd)
Executes a command that edits the member cache.
|
CacheControl.MemberSet |
filter(Level level,
CacheControl.MemberSet baseSet)
Filters a member set, keeping all members at a given Level.
|
static SegmentColumn[] |
findAxisValues(CacheControl.CellRegion region) |
static List<Member> |
findMeasures(CacheControl.CellRegion region)
Returns a list of members of the Measures dimension which are mentioned
somewhere in a region specification.
|
void |
flush(CacheControl.CellRegion region)
Atomically flushes all the cells in the cell cache that correspond to
measures in a cube and to a given region.
|
void |
flush(CacheControl.MemberSet memberSet)
Atomically flushes all members in the member cache which belong to a
given set.
|
protected void |
flushNonUnion(CacheControl.CellRegion region) |
protected void |
flushRegionList(List<CacheControl.CellRegion> cellRegionList)
Flushes a list of cell regions.
|
void |
flushSchema(Schema schema)
Flushes the given RolapSchema instance from the pool
|
void |
flushSchema(String catalogUrl,
DataSource dataSource)
Flushes the given Schema instance from the pool.
|
void |
flushSchema(String catalogUrl,
String connectionKey,
String jdbcUser,
String dataSourceStr)
Flushes the given Schema instance from the pool.
|
void |
flushSchemaCache()
Flushes the cache which maps schema URLs to metadata.
|
static List<RolapStar> |
getStarList(CacheControl.CellRegion region) |
boolean |
isTraceEnabled()
Tells if tracing is enabled.
|
void |
printCacheState(PrintWriter pw,
CacheControl.CellRegion region)
Prints the state of the cell cache as it pertains to a given region.
|
void |
printCacheState(PrintWriter pw,
CacheControl.MemberSet set)
Prints the state of the member cache as it pertains to a given member
set.
|
void |
trace(String message)
Prints a debug message.
|
public CacheControlImpl(RolapConnection connection)
connection - Connectionpublic CacheControl.CellRegion createMemberRegion(Member member, boolean descendants)
CacheControlcreateMemberRegion in interface CacheControlmember - the memberdescendants - When true, include descendants of the member in the
region.public CacheControl.CellRegion createMemberRegion(boolean lowerInclusive, Member lowerMember, boolean upperInclusive, Member upperMember, boolean descendants)
CacheControlThe members must belong to the same level of the same hierarchy. One of the bounds may be null.
For example, given
then
Member member97Q3; // [Time].[1997].[Q3]
Member member98Q2; // [Time].[1998].[Q2]
| Expression | Meaning |
|---|---|
createMemberRegion(true, member97Q3, true, member98Q2,
false)
|
The members between 97Q3 and 98Q2, inclusive: [Time].[1997].[Q3], [Time].[1997].[Q4], [Time].[1998].[Q1], [Time].[1998].[Q2] |
createMemberRegion(true, member97Q3, false, member98Q2,
false)
|
The members between 97Q3 and 98Q2, exclusive: [Time].[1997].[Q4], [Time].[1998].[Q1] |
createMemberRegion(true, member97Q3, false, member98Q2,
false)
|
The members between 97Q3 and 98Q2, including their descendants, and
including the lower bound but not the upper bound: [Time].[1997].[Q3], [Time].[1997].[Q3].[7], [Time].[1997].[Q3].[8], [Time].[1997].[Q3].[9], [Time].[1997].[Q4], [Time].[1997].[Q4].[10], [Time].[1997].[Q4].[11], [Time].[1997].[Q4].[12], [Time].[1998].[Q1], [Time].[1998].[Q1].[1], [Time].[1998].[Q1].[2], [Time].[1998].[Q1].[3] |
createMemberRegion in interface CacheControllowerInclusive - whether the the range includes the lower bound;
ignored if the lower bound is not specifiedlowerMember - lower bound member.
If null, takes all preceding membersupperInclusive - whether the the range includes the upper bound;
ignored if the upper bound is not specifiedupperMember - upper bound member.
If null, takes all preceding membersdescendants - when true, include descendants of the member in the
regionpublic CacheControl.CellRegion createCrossjoinRegion(CacheControl.CellRegion... regions)
CacheControlcreateCrossjoinRegion in interface CacheControlregions - the operandspublic CacheControl.CellRegion createUnionRegion(CacheControl.CellRegion... regions)
CacheControlcreateUnionRegion in interface CacheControlregions - the operandspublic CacheControl.CellRegion createMeasuresRegion(Cube cube)
CacheControlcreateMeasuresRegion in interface CacheControlcube - a cubepublic void flush(CacheControl.CellRegion region)
CacheControlflush in interface CacheControlregion - a regionprotected void flushRegionList(List<CacheControl.CellRegion> cellRegionList)
cellRegionList - List of cell regionspublic void trace(String message)
CacheControltrace in interface CacheControlmessage - the messagepublic boolean isTraceEnabled()
CacheControlisTraceEnabled in interface CacheControlpublic void flushSchemaCache()
CacheControlThis cache is referenced only when creating a new connection, so existing connections will continue to use the same schema definition.
Flushing the schema cache will flush all aggregations and segments associated to it as well.
flushSchemaCache in interface CacheControlpublic void flushSchema(String catalogUrl, String connectionKey, String jdbcUser, String dataSourceStr)
CacheControlFlushing the schema cache will flush all aggregations and segments associated to it as well.
flushSchema in interface CacheControlpublic void flushSchema(String catalogUrl, DataSource dataSource)
CacheControlFlushing the schema cache will flush all aggregations and segments associated to it as well.
flushSchema in interface CacheControlpublic void flushSchema(Schema schema)
flushSchema in interface CacheControlschema - RolapSchemaprotected void flushNonUnion(CacheControl.CellRegion region)
public static List<Member> findMeasures(CacheControl.CellRegion region)
region - Cell regionpublic static SegmentColumn[] findAxisValues(CacheControl.CellRegion region)
public static List<RolapStar> getStarList(CacheControl.CellRegion region)
public void printCacheState(PrintWriter pw, CacheControl.CellRegion region)
CacheControlprintCacheState in interface CacheControlpw - the output targetregion - the CellRegion of interestpublic CacheControl.MemberSet createMemberSet(Member member, boolean descendants)
CacheControlcreateMemberSet in interface CacheControlmember - a memberdescendants - when true, include descendants in the setpublic CacheControl.MemberSet createMemberSet(boolean lowerInclusive, Member lowerMember, boolean upperInclusive, Member upperMember, boolean descendants)
CacheControlCacheControl.createMemberRegion(boolean,
Member, boolean, Member, boolean), which see for examples.)createMemberSet in interface CacheControllowerInclusive - whether the the range includes the lower bound;
ignored if the lower bound is not specifiedlowerMember - lower bound member.
If null, takes all preceding membersupperInclusive - whether the the range includes the upper bound;
ignored if the upper bound is not specifiedupperMember - upper bound member.
If null, takes all preceding membersdescendants - when true, include descendants of the member in the
regionpublic CacheControl.MemberSet createUnionSet(CacheControl.MemberSet... args)
CacheControlcreateUnionSet in interface CacheControlargs - the operandspublic CacheControl.MemberSet filter(Level level, CacheControl.MemberSet baseSet)
CacheControlfilter in interface CacheControllevel - LevelbaseSet - Member setpublic void flush(CacheControl.MemberSet memberSet)
CacheControlflush in interface CacheControlmemberSet - a set of memberspublic void printCacheState(PrintWriter pw, CacheControl.MemberSet set)
CacheControlprintCacheState in interface CacheControlpw - the output targetset - the MemberSet of interestpublic CacheControl.MemberEditCommand createCompoundCommand(List<CacheControl.MemberEditCommand> commandList)
CacheControlcreateCompoundCommand in interface CacheControlcommandList - a list of the component commandspublic CacheControl.MemberEditCommand createCompoundCommand(CacheControl.MemberEditCommand... commands)
CacheControlcreateCompoundCommand in interface CacheControlcommands - the component commandspublic CacheControl.MemberEditCommand createDeleteCommand(Member member)
CacheControlcreateDeleteCommand in interface CacheControlmember - the memberpublic CacheControl.MemberEditCommand createDeleteCommand(CacheControl.MemberSet s)
CacheControlcreateDeleteCommand in interface CacheControls - the setpublic CacheControl.MemberEditCommand createAddCommand(Member member) throws IllegalArgumentException
CacheControlThe ordinal position of the new member among its siblings is implied by its properties.
createAddCommand in interface CacheControlmember - the new memberIllegalArgumentException - if member null
or if member belongs to a parent-child hierarchypublic CacheControl.MemberEditCommand createMoveCommand(Member member, Member loc) throws IllegalArgumentException
CacheControlcreateMoveCommand in interface CacheControlmember - the member movedloc - the new parentIllegalArgumentException - if member is null,
or loc is null,
or member belongs to a parent-child hierarchy,
or if loc is incompatible with memberpublic CacheControl.MemberEditCommand createSetPropertyCommand(Member member, String name, Object value) throws IllegalArgumentException
CacheControlcreateSetPropertyCommand in interface CacheControlmember - the membername - the property namevalue - the property valueIllegalArgumentException - if the property is invalid for the
memberpublic CacheControl.MemberEditCommand createSetPropertyCommand(CacheControl.MemberSet members, Map<String,Object> propertyValues) throws IllegalArgumentException
CacheControlcreateSetPropertyCommand in interface CacheControlmembers - the set of memberspropertyValues - Collection of property-value pairsIllegalArgumentException - for an invalid property, or if all
members in the set do not belong to the same Level.public void execute(CacheControl.MemberEditCommand cmd)
CacheControlexecute in interface CacheControlcmd - the commandCopyright © 2021 Hitachi Vantara. All rights reserved.