|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.storage.olap.PerformanceTuning
public class PerformanceTuning
PerformanceTuning Object defines the performance settings for OLAP data. The OLAP data model s this information to make the remote calls more efficient by bringing over and storing the right amount of data. Each OLAP data model has a default PerformanceTuning object (with default values) associated with it. The model maintains different caches for the cells and tuples (for each axis). The performance properties can be set on any of the following cache types.
A viewer or a r can let the model know how it is going to access the data by setting the properties on the PerformanceTuning Object. Any time a r or viewer wants to get data in blocks, they should set the page size to the display size of the viewer. This will enable the model to get the data in blocks of page sizes.CELL_TYPE
,FORMATTED_CELL_TYPE
,ALL_CELL_TYPES
,COLUMNS_AXIS_TYPE
,ROWS_AXIS_TYPE
,PAGES_AXIS_TYPE
,SECTIONS_AXIS_TYPE
,CHAPTERS_AXIS_TYPE
,SLICERS_AXIS_TYPE
,ALL_AXIS_TYPES
,ALL_TYPES
.
PerformanceTuning pf = ((OLAPDataSetNavigation)olapDataSet).getPerformanceTuning(); if (pf == null) pf = new PerformanceTuning(); pf.setPageCount(PerformanceTuning.ALL_AXIS_TYPES, 4); pf.setPageSize(PerformanceTuning.COLUMNS_AXIS_TYPE, 5); pf.setPageSize(PerformanceTuning.ROWS_AXIS_TYPE, 10); ((OLAPDataSetNavigation)olapDataSet).setPerformanceTuning(pf);
businessQueryToOLAPDataSetAdapter1 = new BusinessQueryToOLAPDataSetAdapter( ); businessQueryToOLAPDataSetAdapter1 = new BusinessQueryToOLAPDataSetAdapter( ); businessQueryToOLAPDataSetAdapter1.setModel( dataSelection1 ); PerformanceTuning pf = businessQueryToOLAPDataSetAdapter1.getPerformanceTuning(); if (pf == null) pf = new PerformanceTuning(); pf.setPageSize(PerformanceTuning.ALL_AXIS_TYPES, 20); pf.setPageSize(PerformanceTuning.ALL_AXIS_TYPES, 5); ((OLAPDataSetInterface)businessQueryToOLAPDataSetAdapter1).setPerformanceTuning(pf); //Do not set the model afterwards, otherwise the performance tuning settings are lost. businessQueryToOLAPDataSetAdapter1.setModel( dataSelection1 );Buffer size property is d to set the size of a cache. A r who does not want any data discarded once retrieved with a remote call would have to set the buffer size for all cache types to be the count of the data for that type, that is the tuple count for axis type and cell count for cell type. Or they can the constant MAX_VALUE to mean all the possible values. For example, in the above example pf.setBufferSize(ALL_TYPES, PerformanceTuning.MAX_VALUE The constant MAX_VALUE can be d with any property page count, page size etc.
Field Summary | |
---|---|
static int |
ALL_AXIS_TYPES
Constant to indicate All axis type |
static int |
ALL_CELL_TYPES
Constant to indicate both formatted and unformatted cell types |
static int |
ALL_TYPES
Constant to indicate all types, that is all cell and axis type |
static int |
CELL_TYPE
Constant to indicate the unformatted cell cache type |
static int |
CHAPTERS_AXIS_TYPE
Constant to indicate Chapter axis type |
static int |
COLUMNS_AXIS_TYPE
Constant to indicate Column axis type |
static int |
FORMATTED_CELL_TYPE
Constant to indicate theFormatted cell cache type |
static int |
MAX_VALUE
Constant indicating maximum value for any property. |
static int |
PAGES_AXIS_TYPE
Constant to indicate Page axis type |
static java.lang.String |
RB_KEY
|
static int |
ROWS_AXIS_TYPE
Constant to indicate Row axis type |
static int |
SECTIONS_AXIS_TYPE
Constant to indicate Section axis type |
static int |
SLICERS_AXIS_TYPE
Constant to indicate Slicer axis type |
Constructor Summary | |
---|---|
PerformanceTuning()
|
|
PerformanceTuning(int numAxes)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
|
com.sas.storage.olap.CacheProperties[] |
getAllCaches()
|
int |
getBufferSize(int cacheType)
Get the buffer size of the specified cache. |
com.sas.storage.olap.CacheProperties[] |
getCache(int cacheType)
|
int |
getLookAhead(int cacheType)
|
OLAPDataSetInterface |
getModel()
Used internally |
int |
getPageCount(int cacheType)
Get the value for the page count for the specified cache. |
int |
getPageSize(int cacheType)
Get the page size for the specified cache. |
boolean |
isLookAheadEnabled(int cacheType)
Check if the look ahead is set. |
void |
setBufferSize(int cacheType,
int size)
Set the size for the cache. |
void |
setLookAheadEnabled(int cacheType,
boolean lookAheadEnabled)
Set if the look ahead is enabled or not. |
void |
setModel(OLAPDataSetInterface model)
Used internally |
void |
setPageCount(int cacheType,
int pageCount)
Set the number of pages to get with a remote call. |
void |
setPageSize(int cacheType,
int size)
Set the page size for the specified cache. |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static int MAX_VALUE
public static int CELL_TYPE
public static int FORMATTED_CELL_TYPE
public static int ALL_CELL_TYPES
public static int COLUMNS_AXIS_TYPE
public static int ROWS_AXIS_TYPE
public static int PAGES_AXIS_TYPE
public static int SECTIONS_AXIS_TYPE
public static int CHAPTERS_AXIS_TYPE
public static int SLICERS_AXIS_TYPE
public static int ALL_AXIS_TYPES
public static int ALL_TYPES
Constructor Detail |
---|
public PerformanceTuning()
public PerformanceTuning(int numAxes)
Method Detail |
---|
public com.sas.storage.olap.CacheProperties[] getCache(int cacheType)
public com.sas.storage.olap.CacheProperties[] getAllCaches()
public OLAPDataSetInterface getModel()
public void setModel(OLAPDataSetInterface model)
public void setBufferSize(int cacheType, int size) throws OLAPException
type
- indicating the cache whose size you are setting. The types are
CELL_TYPE
,FORMATTED_CELL_TYPE
,ALL_CELL_TYPES
,COLUMNS_AXIS_TYPE
,ROWS_AXIS_TYPE
,PAGES_AXIS_TYPE
,SECTIONS_AXIS_TYPE
,CHAPTERS_AXIS_TYPE
,SLICERS_AXIS_TYPE
,ALL_AXIS_TYPES
,ALL_TYPES
.
size
- new size of the cache.
OLAPException
public int getBufferSize(int cacheType) throws OLAPException
type
- indicating the cache whose size you are getting. The types are
CELL_TYPE
,FORMATTED_CELL_TYPE
,COLUMNS_AXIS_TYPE
,ROWS_AXIS_TYPE
,PAGES_AXIS_TYPE
,SECTIONS_AXIS_TYPE
,CHAPTERS_AXIS_TYPE
,SLICERS_AXIS_TYPE
,
OLAPException
public void setLookAheadEnabled(int cacheType, boolean lookAheadEnabled) throws OLAPException
type
- indicating the cache whose look ahead should be enabled or disabled. The types are
CELL_TYPE
,FORMATTED_CELL_TYPE
,ALL_CELL_TYPES
,COLUMNS_AXIS_TYPE
,ROWS_AXIS_TYPE
,PAGES_AXIS_TYPE
,SECTIONS_AXIS_TYPE
,CHAPTERS_AXIS_TYPE
,SLICERS_AXIS_TYPE
,ALL_AXIS_TYPES
,ALL_TYPES
.
lookAheadEnabled
- if true, the remote call will get elements that are
the size specified by page size and page count property, if false will only
get the requested elements
OLAPException
public boolean isLookAheadEnabled(int cacheType) throws OLAPException
type
- indicating the cache for which the look ahead is requested. The types are
CELL_TYPE
,FORMATTED_CELL_TYPE
,ALL_CELL_TYPES
,COLUMNS_AXIS_TYPE
,ROWS_AXIS_TYPE
,PAGES_AXIS_TYPE
,SECTIONS_AXIS_TYPE
,CHAPTERS_AXIS_TYPE
,SLICERS_AXIS_TYPE
,ALL_AXIS_TYPES
,ALL_TYPES
.
OLAPException
public void setPageCount(int cacheType, int pageCount) throws OLAPException
type
- indicating the cache for which the page count is set.pageCount
- number of pages to request with a remote call.
OLAPException
public int getPageCount(int cacheType) throws OLAPException
type
- indicating the type of cache to get the count.
OLAPException
public void setPageSize(int cacheType, int size) throws OLAPException
type
- indicating the cache to set the page size.pageSize
- indicating size of the page, which is d to determine the block of
reads.
OLAPException
public int getPageSize(int cacheType) throws OLAPException
type
- indicating the cache to set the page size.
OLAPException
public int getLookAhead(int cacheType) throws OLAPException
OLAPException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |