public abstract class AbstractJdbcPersister extends Object implements org.springframework.beans.factory.InitializingBean, EventProcessor
Constants.MULTIPLE_VAL_DELIM
,
Constants.DB_ATTRIB_DELIM
,
Constants.NAME_VAL_DELIM
,
Constants.MULTIPLE_VAL_DELIM
,
Constants.DB_ATTRIB_DELIM
,
Constants.NAME_VAL_DELIM
,
Constants.MULTIPLE_VAL_DELIM
,
Constants.DB_ATTRIB_DELIM
,
Constants.NAME_VAL_DELIM
Modifier and Type | Field and Description |
---|---|
protected static int |
EVENT_ACKUSER_FIELD_SIZE
Constant
EVENT_ACKUSER_FIELD_SIZE=256 |
protected static int |
EVENT_AUTOACTION_FIELD_SIZE
Constant
EVENT_AUTOACTION_FIELD_SIZE=256 |
protected static int |
EVENT_CORRELATION_FIELD_SIZE
Constant
EVENT_CORRELATION_FIELD_SIZE=1024 |
protected static int |
EVENT_DPNAME_FIELD_SIZE
Constant
EVENT_DPNAME_FIELD_SIZE=12 |
protected static int |
EVENT_FORWARD_FIELD_SIZE
Constant
EVENT_FORWARD_FIELD_SIZE=256 |
protected static int |
EVENT_HOST_FIELD_SIZE
Constant
EVENT_HOST_FIELD_SIZE=256 |
protected static int |
EVENT_INTERFACE_FIELD_SIZE
Constant
EVENT_INTERFACE_FIELD_SIZE=50 . |
protected static int |
EVENT_LOGGRP_FIELD_SIZE
Constant
EVENT_LOGGRP_FIELD_SIZE=32 |
protected static int |
EVENT_MOUSEOVERTEXT_FIELD_SIZE
Constant
EVENT_MOUSEOVERTEXT_FIELD_SIZE=64 |
protected static int |
EVENT_OPERACTION_FIELD_SIZE
Constant
EVENT_OPERACTION_FIELD_SIZE=256 |
protected static int |
EVENT_OPERACTION_MENU_FIELD_SIZE
Constant
EVENT_OPERACTION_MENU_FIELD_SIZE=64 |
protected static int |
EVENT_PATHOUTAGE_FIELD_SIZE
Constant
EVENT_PATHOUTAGE_FIELD_SIZE=1024 |
protected static int |
EVENT_SNMP_FIELD_SIZE
Constant
EVENT_SNMP_FIELD_SIZE=256 |
protected static int |
EVENT_SNMPHOST_FIELD_SIZE
Constant
EVENT_SNMPHOST_FIELD_SIZE=256 |
protected static int |
EVENT_SOURCE_FIELD_SIZE
Constant
EVENT_SOURCE_FIELD_SIZE=128 |
protected static int |
EVENT_TTICKET_FIELD_SIZE
Constant
EVENT_TTICKET_FIELD_SIZE=128 |
protected static int |
EVENT_UEI_FIELD_SIZE
Constant
EVENT_UEI_FIELD_SIZE=256 |
protected static int |
EVENT_X733_ALARMTYPE_SIZE
Constant
EVENT_X733_ALARMTYPE_SIZE=31 |
protected static char |
MSG_NO
The character to put in if the log or display is to be set to no
|
protected static char |
MSG_YES
The character to put in if the log or display is to be set to yes
|
Constructor and Description |
---|
AbstractJdbcPersister()
Constructor for AbstractJdbcPersister.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
afterPropertiesSet
|
protected boolean |
checkEventSanityAndDoWeProcess(Event event,
String logPrefix)
checkEventSanityAndDoWeProcess
|
DataSource |
getDataSource()
getDataSource
|
EventdServiceManager |
getEventdServiceManager()
getEventdServiceManager
|
protected Timestamp |
getEventTime(Event event)
getEventTime
|
String |
getGetNextIdString()
getGetNextIdString
|
protected int |
getNextId()
getNextId
|
protected int |
getServiceID(String name)
This method is used to convert the service name into a service id.
|
protected void |
set(PreparedStatement stmt,
int ndx,
char value)
Sets the statement up for a character value.
|
protected void |
set(PreparedStatement stmt,
int ndx,
int value)
Sets the statement up for an integer type.
|
protected void |
set(PreparedStatement stmt,
int ndx,
String value)
Sets the statement up for a String value.
|
protected void |
set(PreparedStatement stmt,
int ndx,
Timestamp value)
Sets the statement up for a timestamp type.
|
void |
setDataSource(DataSource dataSource)
setDataSource
|
void |
setEventdServiceManager(EventdServiceManager eventdServiceManager)
setEventdServiceManager
|
void |
setGetNextIdString(String getNextIdString)
setGetNextIdString
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
process
protected static final int EVENT_UEI_FIELD_SIZE
EVENT_UEI_FIELD_SIZE=256
protected static final int EVENT_HOST_FIELD_SIZE
EVENT_HOST_FIELD_SIZE=256
protected static final int EVENT_INTERFACE_FIELD_SIZE
EVENT_INTERFACE_FIELD_SIZE=50
.
This value must be long enough to accommodate an IPv6 address
with scope identifier suffix (if present). Basic IPv6 addresses
are 39 characters so this will accommodate a 10-digit scope
identifier (any 32-bit decimal value).protected static final int EVENT_DPNAME_FIELD_SIZE
EVENT_DPNAME_FIELD_SIZE=12
protected static final int EVENT_SNMPHOST_FIELD_SIZE
EVENT_SNMPHOST_FIELD_SIZE=256
protected static final int EVENT_SNMP_FIELD_SIZE
EVENT_SNMP_FIELD_SIZE=256
protected static final int EVENT_LOGGRP_FIELD_SIZE
EVENT_LOGGRP_FIELD_SIZE=32
protected static final int EVENT_PATHOUTAGE_FIELD_SIZE
EVENT_PATHOUTAGE_FIELD_SIZE=1024
protected static final int EVENT_CORRELATION_FIELD_SIZE
EVENT_CORRELATION_FIELD_SIZE=1024
protected static final int EVENT_AUTOACTION_FIELD_SIZE
EVENT_AUTOACTION_FIELD_SIZE=256
protected static final int EVENT_OPERACTION_FIELD_SIZE
EVENT_OPERACTION_FIELD_SIZE=256
protected static final int EVENT_OPERACTION_MENU_FIELD_SIZE
EVENT_OPERACTION_MENU_FIELD_SIZE=64
protected static final int EVENT_TTICKET_FIELD_SIZE
EVENT_TTICKET_FIELD_SIZE=128
protected static final int EVENT_FORWARD_FIELD_SIZE
EVENT_FORWARD_FIELD_SIZE=256
protected static final int EVENT_MOUSEOVERTEXT_FIELD_SIZE
EVENT_MOUSEOVERTEXT_FIELD_SIZE=64
protected static final int EVENT_ACKUSER_FIELD_SIZE
EVENT_ACKUSER_FIELD_SIZE=256
protected static final int EVENT_SOURCE_FIELD_SIZE
EVENT_SOURCE_FIELD_SIZE=128
protected static final int EVENT_X733_ALARMTYPE_SIZE
EVENT_X733_ALARMTYPE_SIZE=31
protected static final char MSG_YES
protected static final char MSG_NO
public AbstractJdbcPersister()
Constructor for AbstractJdbcPersister.
protected void set(PreparedStatement stmt, int ndx, String value) throws SQLException
stmt
- The statement to add the value to.ndx
- The ndx for the value.value
- The value to add to the statement.SQLException
- Thrown if there is an error adding the value to the
statement.SQLException
- if any.protected void set(PreparedStatement stmt, int ndx, int value) throws SQLException
stmt
- The statement to add the value to.ndx
- The ndx for the value.value
- The value to add to the statement.SQLException
- Thrown if there is an error adding the value to the
statement.SQLException
- if any.protected void set(PreparedStatement stmt, int ndx, Timestamp value) throws SQLException
stmt
- The statement to add the value to.ndx
- The ndx for the value.value
- The value to add to the statement.SQLException
- Thrown if there is an error adding the value to the
statement.SQLException
- if any.protected void set(PreparedStatement stmt, int ndx, char value) throws SQLException
stmt
- The statement to add the value to.ndx
- The ndx for the value.value
- The value to add to the statement.SQLException
- Thrown if there is an error adding the value to the
statement.SQLException
- if any.protected int getServiceID(String name) throws SQLException
name
- The name of the serviceSQLException
- Thrown if there is an error accessing the stored data or
the SQL text is malformed. This will also be thrown if the
result cannot be obtained.SQLException
- if any.EventdConstants.SQL_DB_SVCNAME_TO_SVCID
protected int getNextId() throws SQLException
getNextId
SQLException
- if any.public void afterPropertiesSet() throws SQLException
afterPropertiesSet
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
SQLException
- if any.public EventdServiceManager getEventdServiceManager()
getEventdServiceManager
EventdServiceManager
object.public void setEventdServiceManager(EventdServiceManager eventdServiceManager)
setEventdServiceManager
eventdServiceManager
- a EventdServiceManager
object.public DataSource getDataSource()
getDataSource
DataSource
object.public void setDataSource(DataSource dataSource)
setDataSource
dataSource
- a DataSource
object.public void setGetNextIdString(String getNextIdString)
setGetNextIdString
getNextIdString
- a String
object.Copyright © 2017. All rights reserved.