orca.cod.plugins.db
Class MySqlCodDatabase

java.lang.Object
  extended by orca.util.db.MySqlBase
      extended by orca.shirako.plugins.db.MySqlDatabase
          extended by orca.sharp.plugins.db.MySqlClientDatabase
              extended by orca.cod.plugins.db.MySqlCodDatabase
All Implemented Interfaces:
CodDatabase, ClientDatabase, IDatabase, IInitialize, IRecover, ISerialize
Direct Known Subclasses:
MySqlAuthorityCodDatabase

public class MySqlCodDatabase
extends MySqlClientDatabase
implements CodDatabase


Field Summary
static java.lang.String DefaultMapUrl
           
static java.lang.String TypeNode
           
 
Fields inherited from class orca.sharp.plugins.db.MySqlClientDatabase
Client, Clients, DefaultClientsUrl
 
Fields inherited from class orca.shirako.plugins.db.MySqlDatabase
actorId, actorName, DefaultConfigUrl, DefaultType, PropertyReservationID, reservationListeners
 
Fields inherited from class orca.util.db.MySqlBase
create, db, DefaultSchema, driverPath, joclFileLocation, logger, mapFile, mapper, mySqlPasswd, mySqlServer, mySqlServerPort, mySqlUser, pool, PropertyMySqlDb, PropertyMySqlPassword, PropertyMySqlPool, PropertyMySqlServer, PropertyMySqlServerPort, PropertyMySqlUser, resetState, schemaFile, source, TypeDefault
 
Constructor Summary
MySqlCodDatabase()
           
MySqlCodDatabase(java.lang.String mapFile)
           
 
Method Summary
 void addHandlerInvocation(java.lang.String type, Node node, java.util.Properties p)
          Adds a handler invocation record
 void addNode(Node node)
          Adds a database record for the specified node.
 java.util.Vector<java.util.Properties> getInventoryNodes(int type, int state)
          Retrieves all nodes from all inventory slices that are from the specified type and are in the specified state.
protected  java.lang.String getList(NodeID[] items)
           
 java.util.Vector<java.util.Properties> getNode(NodeID nodeID)
          Retrieves the specified node record.
 java.util.Vector<java.util.Properties> getNodes(int type, int state)
          Retrieves all nodes from all slices that are from the specified type and are in the specified state.
 java.util.Vector<java.util.Properties> getNodes(NodeID[] ids)
          Retrieves the specified nodes
 java.util.Vector<java.util.Properties> getNodes(ReservationID rid)
          Retrieves all nodes for the specified reservation
 java.util.Vector<java.util.Properties> getNodes(ReservationID reservationID, int state)
          Retrieves all nodes for the reservation that are in the specified state.
 java.util.Vector<java.util.Properties> getNodes(SliceID sliceID)
          Retrieves all nodes in the specified slice
 java.util.Vector<java.util.Properties> getNodes(SliceID sliceID, int state)
          Retrieves all nodes in the specified slice that are in the specified state
 void removeHandlerInvocation(java.lang.String type, Node node, java.util.Properties p)
          Removes a handler invocation record
 void removeNode(NodeID nodeID)
          Removes the database record for the specified node.
 void updateNode(Node node)
          Updates the corresponding node record.
 
Methods inherited from class orca.sharp.plugins.db.MySqlClientDatabase
addClient, getClient, getClients, removeClient, updateClient
 
Methods inherited from class orca.shirako.plugins.db.MySqlDatabase
actorAdded, addBroker, addConfigurationMapping, addReservation, addSlice, createSearchResults, createSearchResultsTyped, getActorIdFromName, getActorIdFromName, getAgentReservations, getAuthorityReservations, getBrokers, getClientReservations, getClientSlices, getConfigurationMapping, getConfigurationMappings, getHoldings, getInventorySlices, getReservation, getReservations, getReservations, getSlice, getSlice, getSliceIdFromGuid, getSliceIdFromGuid, getSlices, initialize, notifyReservationListeners, registerReservationListener, removeBroker, removeConfigurationMapping, removeReservation, removeSlice, revisit, setActorName, unregisterReservationListener, updateBroker, updateConfigurationMapping, updateReservation, updateSlice
 
Methods inherited from class orca.util.db.MySqlBase
checkDb, checkDrivers, configure, constructQueryPartial, getConnection, getDb, getLogger, getMySqlPasswd, getMySqlServer, getMySqlServerPort, getMySqlUser, getPoolConfigLocation, getSchemaString, getServerConnection, loadDrivers, reset, resetDB, returnConnection, save, save, setDb, setLogger, setMySqlPasswd, setMySqlServer, setMySqlServerPort, setMySqlUser, setPoolConfigLocation, setResetState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface orca.shirako.api.IDatabase
actorAdded, addBroker, addConfigurationMapping, addReservation, addSlice, getAgentReservations, getAuthorityReservations, getBrokers, getClientReservations, getClientSlices, getConfigurationMapping, getConfigurationMappings, getHoldings, getInventorySlices, getLogger, getReservation, getReservations, getReservations, getSlice, getSlice, getSlices, registerReservationListener, removeBroker, removeConfigurationMapping, removeReservation, removeSlice, setActorName, setLogger, setResetState, unregisterReservationListener, updateBroker, updateConfigurationMapping, updateReservation, updateSlice
 
Methods inherited from interface orca.shirako.api.IInitialize
initialize
 
Methods inherited from interface orca.shirako.api.ISerialize
reset, save, save
 
Methods inherited from interface orca.shirako.api.IRecover
revisit
 

Field Detail

DefaultMapUrl

public static final java.lang.String DefaultMapUrl
See Also:
Constant Field Values

TypeNode

public static final java.lang.String TypeNode
See Also:
Constant Field Values
Constructor Detail

MySqlCodDatabase

public MySqlCodDatabase()

MySqlCodDatabase

public MySqlCodDatabase(java.lang.String mapFile)
Method Detail

addNode

public void addNode(Node node)
             throws java.lang.Exception
Description copied from interface: CodDatabase
Adds a database record for the specified node.

Specified by:
addNode in interface CodDatabase
Parameters:
node - node object
Throws:
java.lang.Exception

removeNode

public void removeNode(NodeID nodeID)
                throws java.lang.Exception
Description copied from interface: CodDatabase
Removes the database record for the specified node.

Specified by:
removeNode in interface CodDatabase
Parameters:
nodeID - node identifier
Throws:
java.lang.Exception

updateNode

public void updateNode(Node node)
                throws java.lang.Exception
Description copied from interface: CodDatabase
Updates the corresponding node record.

Specified by:
updateNode in interface CodDatabase
Parameters:
node - node object
Throws:
java.lang.Exception

getNode

public java.util.Vector<java.util.Properties> getNode(NodeID nodeID)
                                               throws java.lang.Exception
Description copied from interface: CodDatabase
Retrieves the specified node record.

Specified by:
getNode in interface CodDatabase
Parameters:
nodeID - node identifier
Returns:
Throws:
java.lang.Exception

getNodes

public java.util.Vector<java.util.Properties> getNodes(ReservationID rid)
                                                throws java.lang.Exception
Description copied from interface: CodDatabase
Retrieves all nodes for the specified reservation

Specified by:
getNodes in interface CodDatabase
Parameters:
rid - Reservation id
Returns:
Throws:
java.lang.Exception

getNodes

public java.util.Vector<java.util.Properties> getNodes(ReservationID reservationID,
                                                       int state)
                                                throws java.lang.Exception
Description copied from interface: CodDatabase
Retrieves all nodes for the reservation that are in the specified state.

Specified by:
getNodes in interface CodDatabase
Parameters:
reservationID - Reservation
state - Node state
Returns:
Throws:
java.lang.Exception

getNodes

public java.util.Vector<java.util.Properties> getNodes(SliceID sliceID)
                                                throws java.lang.Exception
Description copied from interface: CodDatabase
Retrieves all nodes in the specified slice

Specified by:
getNodes in interface CodDatabase
Returns:
Throws:
java.lang.Exception

getNodes

public java.util.Vector<java.util.Properties> getNodes(SliceID sliceID,
                                                       int state)
                                                throws java.lang.Exception
Description copied from interface: CodDatabase
Retrieves all nodes in the specified slice that are in the specified state

Specified by:
getNodes in interface CodDatabase
Parameters:
sliceID - sliceName
Returns:
Throws:
java.lang.Exception

getNodes

public java.util.Vector<java.util.Properties> getNodes(int type,
                                                       int state)
                                                throws java.lang.Exception
Description copied from interface: CodDatabase
Retrieves all nodes from all slices that are from the specified type and are in the specified state.

Specified by:
getNodes in interface CodDatabase
Parameters:
type - type
state - state
Returns:
Throws:
java.lang.Exception

getInventoryNodes

public java.util.Vector<java.util.Properties> getInventoryNodes(int type,
                                                                int state)
                                                         throws java.lang.Exception
Description copied from interface: CodDatabase
Retrieves all nodes from all inventory slices that are from the specified type and are in the specified state.

Specified by:
getInventoryNodes in interface CodDatabase
Parameters:
type - type
state - state
Returns:
Throws:
java.lang.Exception

addHandlerInvocation

public void addHandlerInvocation(java.lang.String type,
                                 Node node,
                                 java.util.Properties p)
                          throws java.lang.Exception
Description copied from interface: CodDatabase
Adds a handler invocation record

Specified by:
addHandlerInvocation in interface CodDatabase
Parameters:
type -
node -
p -
Throws:
java.lang.Exception

removeHandlerInvocation

public void removeHandlerInvocation(java.lang.String type,
                                    Node node,
                                    java.util.Properties p)
                             throws java.lang.Exception
Description copied from interface: CodDatabase
Removes a handler invocation record

Specified by:
removeHandlerInvocation in interface CodDatabase
Parameters:
type -
node -
p -
Throws:
java.lang.Exception

getNodes

public java.util.Vector<java.util.Properties> getNodes(NodeID[] ids)
                                                throws java.lang.Exception
Description copied from interface: CodDatabase
Retrieves the specified nodes

Specified by:
getNodes in interface CodDatabase
Parameters:
ids - an array of node identifiers
Throws:
java.lang.Exception

getList

protected java.lang.String getList(NodeID[] items)


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.