|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RtaSession
A user session to communicate with the metric engine. The main class used for saving and retrieving model changes to the engine, querying the metrics as well as for submitting facts to the engine.
RtaSession
is thread-safe
Method Summary | ||
---|---|---|
void |
clearAlerts(java.util.Collection<java.lang.String> alert_ids)
Clear All alerts specified by ids |
|
void |
close()
Close the session and cleanup any underlying resources. |
|
Query |
createQuery()
Register a transient query on the server. |
|
void |
createRule(RuleDef rule)
Create a new rule with the specified descriptor. |
|
void |
deleteRule(java.lang.String name)
Delete the rule with the given name. |
|
java.util.List<ActionFunctionDescriptor> |
getAllActionFunctionDescriptors()
Get all action function descriptor |
|
java.util.List<MetricFunctionDescriptor> |
getAllFunctionDescriptors()
|
|
java.util.List<RuleDef> |
getAllRuleDefs()
Get all the rule definitions configured on the server. |
|
|
getChildMetrics(Metric<S> metric,
java.util.List<MetricFieldTuple> orderByList)
Get this metrics child metrics (for drilldown) |
|
java.lang.String |
getClientId()
Return session id. |
|
|
getConstituentFacts(Metric<S> metric,
java.util.List<MetricFieldTuple> orderByList)
Get this metrics constituent facts (for drilldown and analysis) |
|
RuleDef |
getRule(java.lang.String name)
Get the rule with the specified name. |
|
java.util.List<java.lang.String> |
getRules()
Get all the rules configured on the server. |
|
|
getSchema(java.lang.String name)
Gets a schema with this name available with the metric engine. |
|
com.tibco.rta.model.runtime.ServerConfigurationCollection |
getServerConfiguration()
Gets the server side runtime configuration. |
|
void |
init()
Synchronous session initialization which attempts to connect to metric server. |
|
void |
init(long timeout,
java.util.concurrent.TimeUnit units)
Synchronous session initialization which attempts to connect to metric server. |
|
java.util.concurrent.Future<java.lang.Object> |
publishFact(Fact fact)
Publish a fact to the metric/aggregation engine. |
|
RtaSchema |
registerSchema(RtaSchema schema)
Register schema with this session locally. |
|
void |
setCommandListener(RtaCommandListener listener)
Listener for asynchronous command notifications. |
|
void |
setNotificationListener(RtaNotificationListener listener)
Set a listener interested in server notifications for all possible server notifications |
|
void |
setNotificationListener(RtaNotificationListener listener,
int interestEvents)
Set a listener interested in server notifications like transaction success, failure etc. |
|
void |
updateRule(RuleDef rule)
Update an existing rule with the specified descriptor. |
Method Detail |
---|
void init() throws ConnectionRefusedException, SessionInitFailedException
If session is already inited, this call does not do anything.
ConnectionRefusedException
- if connection could not be established.
SessionInitFailedException
- Any failure in init phasevoid init(long timeout, java.util.concurrent.TimeUnit units) throws ConnectionRefusedException, SessionInitFailedException
If session is already inited, this call does not do anything.
This call blocks only for specified timeout period.
If session init could not complete during this time,
SessionInitFailedException
is thrown.
timeout
- time to wait for init to completeunits
- Timeunits.
ConnectionRefusedException
- if connection could not be established.
SessionInitFailedException
- Any failure in init phase.java.lang.String getClientId()
@Idempotent @RetryOnRejection <T extends RtaSchema> T getSchema(java.lang.String name) throws RtaException
name
- the name
RtaException
- if session was closed or the remote operation failed.RtaSchema registerSchema(RtaSchema schema) throws RtaException
This operation is a local operation and does not communicate with the metric engine.
schema
- the schema
RtaSchema
RtaException
@Idempotent java.util.concurrent.Future<java.lang.Object> publishFact(Fact fact) throws RtaException
Facts will be buffered and asynchronously asserted to the metric engine in a manner driven by a buffer criterion
The Future
returned by this API may return a null when its get
is called since facts are buffered and another get
call on another future
may return more than one such ids separated by a ,
fact
- The fact instance to be published.
RtaException
- if session was closed or the remote operation failed.void close() throws RtaException
RtaException
@Idempotent @RetryOnRejection Query createQuery() throws RtaException
RtaException
@Idempotent @RetryOnRejection <S,T> Browser<T> getChildMetrics(Metric<S> metric, java.util.List<MetricFieldTuple> orderByList) throws RtaException
metric
- The metricorderByList
- Optional orderBy
RtaException
@Idempotent @RetryOnRejection <S,T> Browser<T> getConstituentFacts(Metric<S> metric, java.util.List<MetricFieldTuple> orderByList) throws RtaException
metric
- The metricorderByList
- Optional orderby
RtaException
void setNotificationListener(RtaNotificationListener listener)
listener
- the lister to notify.void setNotificationListener(RtaNotificationListener listener, int interestEvents)
listener
- the lister to notify.interestEvents
- Set preference for receiving notifications from metric enginevoid setCommandListener(RtaCommandListener listener)
For example if API caller wants to take some action based on rule evaluation like stopping a process on machine, the metric engine will send the command in a manner that can be received by the caller of this API to execute appropriate action.
@Idempotent @RetryOnRejection java.util.List<java.lang.String> getRules() throws java.lang.Exception
java.lang.Exception
@Idempotent @RetryOnRejection java.util.List<RuleDef> getAllRuleDefs() throws java.lang.Exception
java.lang.Exception
@Idempotent @RetryOnRejection RuleDef getRule(java.lang.String name) throws RtaException
name
- the rule name
RtaException
@Idempotent @RetryOnRejection void createRule(RuleDef rule) throws RtaException
rule
- the rule descriptor.
RtaException
@Idempotent @RetryOnRejection void updateRule(RuleDef rule) throws RtaException
rule
- the rule descriptor to update with.
RtaException
@Idempotent @RetryOnRejection void deleteRule(java.lang.String name) throws RtaException
RtaException
@Idempotent @RetryOnRejection java.util.List<MetricFunctionDescriptor> getAllFunctionDescriptors() throws RtaException
RtaException
@Idempotent @RetryOnRejection java.util.List<ActionFunctionDescriptor> getAllActionFunctionDescriptors() throws RtaException
RtaException
com.tibco.rta.model.runtime.ServerConfigurationCollection getServerConfiguration() throws RtaException
RtaException
@Idempotent @RetryOnRejection void clearAlerts(java.util.Collection<java.lang.String> alert_ids) throws RtaException
alert_ids
- to clear
RtaException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |