|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectyass.database.Event
yass.database.PacketGeneratedEvent
public class PacketGeneratedEvent
A packet generation event which occurs in the simulator to be stored for later analysis
| Field Summary | |
|---|---|
private static java.sql.PreparedStatement |
insertionPreparedStatement
A database prepared statement with which to insert packet generation events into the database |
private static org.apache.log4j.Logger |
log
The logger |
private Packet |
packet
The packet which was generated |
| Fields inherited from class yass.database.Event |
|---|
INSERT_ATTEMPT_MAX |
| Constructor Summary | |
|---|---|
PacketGeneratedEvent(Packet packet)
Creates a new instance of PacketGeneratedEvent |
|
| Method Summary | |
|---|---|
private static java.sql.PreparedStatement |
createInsertionPreparedStatement(Database database)
Creates a database prepared statement with which to insert packet generation events into the database |
static java.lang.String |
getInsertSql(DatabaseType type)
Obtains SQL code to insert an instance of this event type into the relevant table |
Packet |
getPacket()
Obtains the packet which was generated |
static java.lang.String[] |
getPurgeSimulationSql(DatabaseType type)
|
static java.lang.String[] |
getRemoveRowSql(DatabaseType type)
Obtains SQL code to remove instances of this event type from the relevant table |
static java.lang.String[] |
getTableBuildSql(DatabaseType type)
Obtains SQL code to build the database table used to store events of this type |
static java.lang.String[] |
getTableDropSql(DatabaseType type)
Obtains SQL code to drop the database table used to store events of this type |
static java.lang.String |
getTableName()
Obtains the name of the database table used to store events of this type |
protected void |
performInsert(Database database,
double timestamp)
Inserts the packet generation event into the supplied database with the specified timestamp |
| Methods inherited from class yass.database.Event |
|---|
insertIntoDatabase, setDoubleColumn, setDoubleColumnSanitiseMissing, setIntegerColumn, setIntegerColumnSanitiseMissing, setShortColumn, setShortColumnSanitiseMissing, shutdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.sql.PreparedStatement insertionPreparedStatement
private static org.apache.log4j.Logger log
private Packet packet
| Constructor Detail |
|---|
public PacketGeneratedEvent(Packet packet)
PacketGeneratedEvent
packet - the packet which was generated| Method Detail |
|---|
protected void performInsert(Database database,
double timestamp)
throws java.sql.SQLException
performInsert in class Eventdatabase - the simulation event databasetimestamp - the time at which the event occured
java.sql.SQLException - if the event cannot be inserted into the database
private static java.sql.PreparedStatement createInsertionPreparedStatement(Database database)
throws java.sql.SQLException
database - the simulation event database
java.sql.SQLExceptionpublic Packet getPacket()
public static java.lang.String getTableName()
public static java.lang.String[] getTableBuildSql(DatabaseType type)
type - the database type
public static java.lang.String getInsertSql(DatabaseType type)
type - the database type
public static java.lang.String[] getTableDropSql(DatabaseType type)
type - the database type
public static java.lang.String[] getRemoveRowSql(DatabaseType type)
type - the database type
public static java.lang.String[] getPurgeSimulationSql(DatabaseType type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||