|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EventEvaluator.Resource.Persistence
Encapsulates all the code responsible for saving the state of resource event objects to persistent storage.
This code is based on mySQL relational database and uses JDBC to access the database.
Constructor Summary | |
Persistence(java.lang.String dbmachine)
Ask for connection with adapatacao database.
|
Method Summary | |
void |
connect()
Establish connection with database adaptacao .
|
void |
REDeleteState(java.lang.String eid)
Deletes the state of resource event evaluator identified by eid from
persistent storage. |
boolean |
REExist(java.lang.String eid)
Check if the state of resource event evaluator identified by eid
is stored on database adaptacao . |
java.lang.String |
REGetRef(java.lang.String eid)
Returns the stringified ior of the resource event evaluator identified by eid . |
java.lang.Object[] |
RELoadState(java.lang.String eid)
Returns the state of the resource event evaluator identified by eid
from database adaptacao . |
void |
RESaveState(java.lang.String eid,
java.lang.String ior,
java.lang.String description,
java.lang.String expression,
int duration_time,
java.lang.String ior_metype)
Saves the state of a resource event object to database adaptacao .
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Persistence(java.lang.String dbmachine)
adapatacao
database.
Receives the name of the machine where mySQL server must be
running and then calls the method responsible for connecting
with the database adaptacao
that stores the state of resource
event objectsdbmachine
- the name of the machine where database adaptacao
residesMethod Detail |
public void connect()
adaptacao
.
Database adaptacao
must reside on the machine specified
by dbmachine
variable. This database must have a defined user
called fssilva
, password AdAptA
with
access rights to READ, UPDATE, DELETE and ADD tuples to the database tables.public void RESaveState(java.lang.String eid, java.lang.String ior, java.lang.String description, java.lang.String expression, int duration_time, java.lang.String ior_metype)
adaptacao
.
The state of resource event objects are saved to a table called
resource_event
.eid
- the id of the resource eventior
- the strigified ior of the resource eventdescription
- the string description of the resource eventexpression
- the expression that defines the resource eventduration_time
- the duration time that the expression must stay true in order
to trigger the eventior_metype
- the stringified ior of the monitored entity type related with
the eventpublic void REDeleteState(java.lang.String eid)
eid
from
persistent storage.eid
- identification of the resource event evaluator to be deletedpublic boolean REExist(java.lang.String eid)
eid
is stored on database adaptacao
.eid
- identification of the resource event evaluatortrue
if eid
is found and
false
otherwise.public java.lang.String REGetRef(java.lang.String eid)
eid
.eid
- identification of the resource event evaluatorpublic java.lang.Object[] RELoadState(java.lang.String eid)
eid
from database adaptacao
.eid
- identification of the resource event evaluator
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |