|
IBM WebSphere Extended Deployment (XD)TM, Release 6.1 ObjectGrid API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface StreamQuerySet
This interface represents a set of stream query streams and views. Usually a stream query set consist of streams and views, where views only use the streams and other views defined in this set.
A StreamQuerySet object serves as a containment object for the stream and view
metadata. It can be deployed or undeployed by calling setDeployed(boolean).
Trying to deploy a deployed StreamQuerySet object or undeploy a
non-deployed StreamQuerySet object will result in an exception.
A StreamQuerySet object can optionally provide an array of partition IDs. This is used when the maps used in this stream query set are partitioned. Users can specifically deploy this StreamQuerySet in particular partitions. If the partition array is not specified, then the stream query set will be deployed to all partitions.
Users can add a stream query set dynamically to an ObjectGrid instance and then deploy it. For example.
// Add a stream query set
StreamQuerySet sqs = objectGrid.addStreamQuerySet("transactionVolumes");
// Add a stream metadata
StreamMetadata stream = sqs.addStreamMetadata();
// set the stream metadata values
stream.setValueClass(SellBids.class).setSql("...");
// Add a view metadata
ViewMetadata view = sqs.addViewMetadata();
// set the view metadata values
view.setSql("...");
// deploy the stream query set
sqs.setDeployed(true);
This interface is designed to work with Spring-style programming. Please refer to
StreamQueryManager for the example.
StreamMetadata,
ViewMetadata| Method Summary | |
|---|---|
StreamMetadata |
addStreamMetadata()
Create a StreamMetadata and add it to the StreamMetadata
list of this StreamQuerySet. |
ViewMetadata |
addViewMetadata()
Create a ViewMetadata and add it to the ViewMetadata
list of this StreamQuerySet. |
StreamQuerySet |
copy()
Deep copy this stream query set. |
StreamMetadata |
createStreamMetadata()
This method creates a StreamMetadata. |
ViewMetadata |
createViewMetadata()
This method create a ViewMetadata. |
java.lang.String |
getName()
|
int[] |
getPartitions()
|
java.util.List |
getStreamMetadatas()
Returns the current list of StreamMetadatas. |
java.util.List |
getViewMetadatas()
Returns the current list of ViewMetadatas. |
boolean |
isDeployed()
|
boolean |
isViewResultsToListenersOnly()
|
void |
setDeployed(boolean deployed)
Deploy or undeploy this StreamQuerySet. |
void |
setName(java.lang.String name)
Set the name of the stream query set |
void |
setPartitions(int[] partitions)
Set the partitions to which the remote dynamic stream query is executed. |
void |
setStreamMetadatas(java.util.List streamMetadatas)
This overwrites the current list of StreamMetadatas
and replaces it with the supplied List of StreamMetadatas. |
void |
setViewMetadatas(java.util.List viewMetadatas)
This overwrites the current list of ViewMetadatas
and replaces it with the supplied List of ViewMetadatas. |
void |
setViewResultsToListenersOnly(boolean viewResultsToListenersOnly)
This method is used to optimize the performance of retrieving the view results. |
| Method Detail |
|---|
java.lang.String getName()
void setName(java.lang.String name)
name - the name of the stream query setStreamMetadata createStreamMetadata()
StreamMetadata.
StreamMetadata addStreamMetadata()
StreamMetadata and add it to the StreamMetadata
list of this StreamQuerySet.
java.lang.IllegalStateException - thrown if the StreamQuerySet is deployed.java.util.List getStreamMetadatas()
StreamMetadatas.
StreamMetadatas.createStreamMetadata(),
setStreamMetadatas(List)void setStreamMetadatas(java.util.List streamMetadatas)
StreamMetadatas
and replaces it with the supplied List of StreamMetadatas.
streamMetadatas - List of StreamMetadatas
java.lang.ClassCastException - if one of the elements in the provided list
is not an instance of StreamMetadata
java.lang.IllegalArgumentException - if streamMetadatas contains a
null reference or an invalid StreamMetadata
java.lang.IllegalStateException - thrown if the StreamQuerySet is deployed- See Also:
StreamMetadataViewMetadata createViewMetadata()
ViewMetadata.
ViewMetadata addViewMetadata()
ViewMetadata and add it to the ViewMetadata
list of this StreamQuerySet.
java.util.List getViewMetadatas()
ViewMetadatas.
ViewMetadatas.createViewMetadata(),
setViewMetadatas(List)void setViewMetadatas(java.util.List viewMetadatas)
ViewMetadatas
and replaces it with the supplied List of ViewMetadatas.
viewMetadatas - List of ViewMetadatas
java.lang.ClassCastException - if one of the elements in the provided list
is not an instance of ViewMetadata
java.lang.IllegalArgumentException - if viewMetadatas is null or empty, or
it contains a null reference or an invalid java.lang.IllegalStateException - thrown if the StreamQuerySet is deployed.ViewMetadataboolean isDeployed()
void setDeployed(boolean deployed)
throws StreamQueryException
StreamQuerySet. This method will use
a default Session object to deploy or undeploy the
StreamQuerySet.
When security is enabled, this method requires an com.ibm.websphere.objectgrid.security.ObjectGridPermission with action "streamquery" if it is invoked from client.
deployed - set to true will deploy this StreamQuerySet; set
to false will undeploy this StreamQuerySet.
StreamQueryException - any exception during the deployment or undeployment
java.lang.IllegalStateException - deploy an already-deployed StreamQuerySet, or undeploy an undeployed StreamQuerySetvoid setPartitions(int[] partitions)
partitions - the array containing the partition IDs
java.lang.IllegalArgumentException - if the partitions are not valid for maps used
by this stream query set
java.lang.IllegalStateException - if no view metadata is set or none of the view maps is
specified; if the stream query set does not belongs to a client ObjectGridint[] getPartitions()
setPartitions(int[])void setViewResultsToListenersOnly(boolean viewResultsToListenersOnly)
viewResultsToListenersOnly - If this value is set to true, then the
stream query view results will not be stored in the ObjectMap in the local ObjectGrid. These results
will be notified to the ObjectGridEventListener(s) set on the ObjectGrid
instance only. If this value is set to false, which is the default value,
then the results will be stored in the ObjectMap, and thus changes will be
notified to the ObjectGridEventListener(s).boolean isViewResultsToListenersOnly()
setViewResultsToListenersOnly(boolean)StreamQuerySet copy()
|
IBM WebSphere Extended Deployment (XD)TM, Release 6.1 ObjectGrid API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||