|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.cmu.aura.service.db.Database
Database provides a simple Database oriented implementation of PrimitiveService. It is currently designed for functionality over performance and scalability.
| Field Summary |
| Fields inherited from interface edu.cmu.aura.service.PrimitiveService |
ALL_ATTRIBS, ANY_CHANGE, DEFAULT_EXEC_INTERVAL, DEFAULT_SERVICE, DEFAULT_SERVICE_NAME, NO_REQS, NO_TIME_LIMIT, RELATION_ATTRIB, SELECT_ALL |
| Constructor Summary | |
Database(java.lang.String name)
Create a new Database. |
|
| Method Summary | |
void |
addTable(edu.cmu.aura.service.db.Table table)
Add a table to this Database. |
void |
delete(java.lang.String serviceName,
java.util.ArrayList keyVal)
Delete an entry from the service database. |
void |
display()
Display the entire Database. |
java.lang.String |
getName()
Get the name of this Database. |
int |
getPort()
Get the port on which this database is accepting incoming requests. |
edu.cmu.aura.service.db.Table |
getTableByName(java.lang.String name)
Get a specified table. |
void |
insert(java.lang.String serviceName,
java.util.ArrayList attribs)
Insert an entry into the service database. |
int |
postCondTrigger(java.util.ArrayList sAttribs,
java.util.ArrayList serviceNames,
ExpressionNode expression,
java.util.ArrayList attribReqs,
long timeLimit,
long execInterval,
ExpressionNode triggerExpression,
edu.cmu.aura.service.rpc.RemoteReference queryClient)
Post a trigger that is to execute when a particular condition is met. |
int |
postModTrigger(java.util.ArrayList sAttribs,
java.util.ArrayList serviceNames,
ExpressionNode expression,
java.util.ArrayList attribReqs,
long timeLimit,
long execInterval,
java.util.ArrayList triggerAttribs,
java.util.ArrayList triggerDeltas,
edu.cmu.aura.service.rpc.RemoteReference queryClient)
Post a trigger that is to execute when any one of a given set of attributes changes by a specified amount. |
int |
postQuery(java.util.ArrayList selectedAttribs,
java.util.ArrayList serviceNames,
ExpressionNode expression,
java.util.ArrayList attribReqs,
long timeLimit,
long execInterval,
edu.cmu.aura.service.rpc.RemoteReference queryClient)
Query a service recurrently. |
QueryResult |
query(java.util.ArrayList selectedAttributes,
java.util.ArrayList serviceNames,
ExpressionNode expression,
java.util.ArrayList attribReqs,
long timeLimit)
Execute a query against this Database. |
void |
removeQuery(java.lang.String serviceName,
int queryID)
Remove a recurrent query. |
void |
removeTrigger(java.lang.String serviceName,
int queryID)
Remove a trigger. |
void |
start()
Should be called before the database is accessed. |
void |
update(java.lang.String serviceName,
java.util.ArrayList keyVal,
java.util.ArrayList attribs)
Update an entry's attributes in the service database. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Database(java.lang.String name)
name - the name of this Database.| Method Detail |
public void start()
public java.lang.String getName()
public int getPort()
public void addTable(edu.cmu.aura.service.db.Table table)
public edu.cmu.aura.service.db.Table getTableByName(java.lang.String name)
name - the name of the table to get.
public void display()
public QueryResult query(java.util.ArrayList selectedAttributes,
java.util.ArrayList serviceNames,
ExpressionNode expression,
java.util.ArrayList attribReqs,
long timeLimit)
throws ServiceException
query in interface PrimitiveServiceserviceNames - names of services to retrieve
attributes from.expression - expression selecting which entities or
relations in the service should be returned.attribReqs - requirements on dynamic attributes.timeLimit - this is used by clients to inform the service
on when they need the results by. This may also be viewed as
a suggestion on how hard to work to retrieve the results.selectedAttributes - attribsutes to select. ALL_ATTRIBS
indicates that all attributes are to be selected.
ServiceException
public int postQuery(java.util.ArrayList selectedAttribs,
java.util.ArrayList serviceNames,
ExpressionNode expression,
java.util.ArrayList attribReqs,
long timeLimit,
long execInterval,
edu.cmu.aura.service.rpc.RemoteReference queryClient)
throws java.rmi.RemoteException,
ServiceException
postQuery in interface PrimitiveServiceselectedAttribs - the attribs to select.serviceNames - names of services to retrieve
attributes from.expression - expression selecting which entities or
relations in the service should be returned.attribReqs - requirements on dynamic attributes.timeLimit - this is used by clients to inform the service
on when they need the results by. This may also be viewed as
a suggestion on how hard to work to retrieve the results.execInterval - interval at which to execute the query.queryClient - the client that should be informed when
this query executes.
java.rmi.RemoteException
ServiceException
public int postCondTrigger(java.util.ArrayList sAttribs,
java.util.ArrayList serviceNames,
ExpressionNode expression,
java.util.ArrayList attribReqs,
long timeLimit,
long execInterval,
ExpressionNode triggerExpression,
edu.cmu.aura.service.rpc.RemoteReference queryClient)
throws java.rmi.RemoteException,
ServiceException
PrimitiveService
postCondTrigger in interface PrimitiveServicesAttribs - attribsutes to select. ALL_ATTRIBS
indicates that all attributes are to be selected.serviceNames - names of services to retrieve
attributes from. DEFAULT_SERVICE may be used if
there is only one service listening on a given port.expression - expression selecting which entities or
relations in the service should be returned. SELECT_ALL
indicates all entities are to be selected.attribReqs - requirements on dynamic attributes. NO_REQS
indicates there are no requirements in effect.timeLimit - this is used by clients to inform the service
on when they need the results by. This may also be viewed as
a suggestion on how hard to work to retrieve the results.
NO_TIME_LIMIT indicates that the client has no hard limit on
how long the processing should take; though a client will likely
still desire reasonably fast execution.execInterval - interval at which to check the trigger.triggerExpression - condition indicating when to
fire the trigger.queryClient - the client that should be informed when
this trigger executes.
java.rmi.RemoteException
ServiceException
public int postModTrigger(java.util.ArrayList sAttribs,
java.util.ArrayList serviceNames,
ExpressionNode expression,
java.util.ArrayList attribReqs,
long timeLimit,
long execInterval,
java.util.ArrayList triggerAttribs,
java.util.ArrayList triggerDeltas,
edu.cmu.aura.service.rpc.RemoteReference queryClient)
throws java.rmi.RemoteException,
ServiceException
PrimitiveService
postModTrigger in interface PrimitiveServicesAttribs - attribsutes to select. ALL_ATTRIBS
indicates that all attributes are to be selected.serviceNames - names of services to retrieve
attributes from. DEFAULT_SERVICE may be used if
there is only one service listening on a given port.expression - expression selecting which entities or
relations in the service should be returned. SELECT_ALL
indicates all entities are to be selected.attribReqs - requirements on dynamic attributes. NO_REQS
indicates there are no requirements in effect.timeLimit - this is used by clients to inform the service
on when they need the results by. This may also be viewed as
a suggestion on how hard to work to retrieve the results.
NO_TIME_LIMIT indicates that the client has no hard limit on
how long the processing should take; though a client will likely
still desire reasonably fast execution.execInterval - interval at which to check the trigger.triggerAttribs - attributes to watch for changes.triggerDeltas - amount of change that will cause the
trigger to fire for the corresponding attribute.queryClient - the client that should be informed when
this trigger executes.
java.rmi.RemoteException
ServiceException
public void removeTrigger(java.lang.String serviceName,
int queryID)
throws java.rmi.RemoteException,
ServiceException
PrimitiveService
removeTrigger in interface PrimitiveServiceserviceName - name of the service to remove the query from.queryID - the ID of the query to remove.
java.rmi.RemoteException
ServiceException
public void removeQuery(java.lang.String serviceName,
int queryID)
throws ServiceException,
java.rmi.RemoteException
removeQuery in interface PrimitiveServiceserviceName - name of the service to remove the query from.queryID - the ID of the query to remove.
ServiceException
java.rmi.RemoteException
public void update(java.lang.String serviceName,
java.util.ArrayList keyVal,
java.util.ArrayList attribs)
throws ServiceException,
java.rmi.RemoteException
DataSink
update in interface DataSinkserviceName - name of the service to updatekeyVal - key value of the entry to updateattribs - updated attributes
ServiceException
java.rmi.RemoteException
public void insert(java.lang.String serviceName,
java.util.ArrayList attribs)
throws ServiceException
DataSink
insert in interface DataSinkserviceName - name of the service to insert intoattribs - updated attributes
ServiceException
public void delete(java.lang.String serviceName,
java.util.ArrayList keyVal)
throws ServiceException
DataSink
delete in interface DataSinkserviceName - name of the service to delete fromkeyVal - key value of entry to delete
ServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||