public final class DbIfServiceEntry extends Object
Once loaded or create, the class tracks any changes and will write those
changes to the database whenever the store
method is invoked.
If a database conneciton is not passed to the store method, then a temporary
one is allocated to write the results.
NOTE: if the connection is passed in and is not in auto commit mode, then the
caller must call commit
to inform the database that the
transaction is complete.
Modifier and Type | Field and Description |
---|---|
static char |
NOTIFY_ON
Deprecated.
|
static char |
SOURCE_PLUGIN
Deprecated.
|
static char |
STATUS_ACTIVE
Deprecated.
Constant
STATUS_ACTIVE='A' |
static char |
STATUS_DELETED
Deprecated.
Constant
STATUS_DELETED='D' |
static char |
STATUS_FORCED
Deprecated.
Constant
STATUS_FORCED='F' |
static char |
STATUS_NOT_POLLED
Deprecated.
Constant
STATUS_NOT_POLLED='N' |
static char |
STATUS_REMOTE
Deprecated.
Constant
STATUS_REMOTE='X' |
static char |
STATUS_RESUME
Deprecated.
Constant
STATUS_RESUME='R' |
static char |
STATUS_SUSPEND
Deprecated.
Constant
STATUS_SUSPEND='S' |
static char |
STATUS_UNKNOWN
Deprecated.
Constant
STATUS_UNKNOWN=' ' |
static char |
STATUS_UNMANAGED
Deprecated.
Constant
STATUS_UNMANAGED='U' |
Modifier and Type | Method and Description |
---|---|
static DbIfServiceEntry |
create(int nid,
InetAddress address,
int sid)
Deprecated.
Creates a new entry.
|
static DbIfServiceEntry |
get(Connection db,
long nodeId,
InetAddress addr,
int sid)
Deprecated.
Retrieves a current record from the database based upon the key fields of
nodeID and ipAddr.
|
static DbIfServiceEntry |
get(int nid,
InetAddress addr,
int sid)
Deprecated.
Retrieves a current record from the database based upon the key fields of
nodeID and ipAddr.
|
InetAddress |
getIfAddress()
Deprecated.
Returns the name of the distributed poller for the entry.
|
int |
getIfIndex()
Deprecated.
Returns the current ifIndex
|
Timestamp |
getLastFail()
Deprecated.
Gets the last fail poll time of the record
|
String |
getLastFailString()
Deprecated.
Gets the last fail poll time of the record
|
Timestamp |
getLastGood()
Deprecated.
Gets the last good poll time of the record
|
String |
getLastGoodString()
Deprecated.
Gets the last good poll time of the record
|
long |
getNodeId()
Deprecated.
Returns the node entry's unique identifier.
|
char |
getNotify()
Deprecated.
Gets the notification state.
|
String |
getQualifier()
Deprecated.
|
int |
getServiceId()
Deprecated.
Returns the service id of this service entry.
|
char |
getSource()
Deprecated.
Gets the source of the interface service.
|
char |
getStatus()
Deprecated.
Gets the current operational status field
|
boolean |
hasIfIndex()
Deprecated.
Returns true if the ifIndex is defined.
|
boolean |
hasIfIndexChanged()
Deprecated.
|
boolean |
hasNotifyChanged()
Deprecated.
|
boolean |
hasQualifierChanged()
Deprecated.
|
boolean |
hasSourceChanged()
Deprecated.
|
boolean |
hasStatusChanged()
Deprecated.
|
static void |
main(String[] args)
Deprecated.
For debugging only
|
void |
setIfIndex(int ndx)
Deprecated.
Sets the ifIndex value
|
void |
setLastFail(Date time)
Deprecated.
Sets the current last fail poll time.
|
void |
setLastFail(String time)
Deprecated.
Sets the current last fail poll time
|
void |
setLastFail(Timestamp time)
Deprecated.
Sets the current last fail poll time.
|
void |
setLastGood(Date time)
Deprecated.
Sets the current last good poll time.
|
void |
setLastGood(String time)
Deprecated.
Sets the current last good poll time
|
void |
setLastGood(Timestamp time)
Deprecated.
Sets the current last good poll time.
|
void |
setNotify(char notify)
Deprecated.
Sets the notification state
|
void |
setQualifier(String qualifier)
Deprecated.
|
void |
setSource(char src)
Deprecated.
Sets the source of the interface service
|
void |
setStatus(char status)
Deprecated.
Sets the current status of the service
|
void |
store()
Deprecated.
Updates the interface information in the configured database.
|
void |
store(Connection db)
Deprecated.
Updates the interface information in the configured database.
|
void |
store(Connection db,
boolean noRollback)
Deprecated.
|
String |
toString()
Deprecated.
Creates a string that displays the internal contents of the record.
|
boolean |
updateIfIndex(int newIfIndex)
Deprecated.
|
boolean |
updateNotify(char newNotify)
Deprecated.
|
boolean |
updateQualifier(String newQualifier)
Deprecated.
|
boolean |
updateSource(char newSource)
Deprecated.
|
boolean |
updateStatus(char newStatus)
Deprecated.
|
public static final char STATUS_UNMANAGED
STATUS_UNMANAGED='U'
public static final char STATUS_ACTIVE
STATUS_ACTIVE='A'
public static final char STATUS_DELETED
STATUS_DELETED='D'
public static final char STATUS_FORCED
STATUS_FORCED='F'
public static final char STATUS_NOT_POLLED
STATUS_NOT_POLLED='N'
public static final char STATUS_UNKNOWN
STATUS_UNKNOWN=' '
public static final char STATUS_SUSPEND
STATUS_SUSPEND='S'
public static final char STATUS_RESUME
STATUS_RESUME='R'
public static final char STATUS_REMOTE
STATUS_REMOTE='X'
public static final char SOURCE_PLUGIN
public static final char NOTIFY_ON
public long getNodeId()
public InetAddress getIfAddress()
public int getServiceId()
public String getLastGoodString()
public Timestamp getLastGood()
public void setLastGood(String time) throws ParseException
time
- The poll time.ParseException
public void setLastGood(Date time)
time
- The poll time.public void setLastGood(Timestamp time)
time
- The poll time.public String getLastFailString()
public Timestamp getLastFail()
public void setLastFail(String time) throws ParseException
time
- The poll time.ParseException
public void setLastFail(Date time)
time
- The poll time.public void setLastFail(Timestamp time)
time
- The poll time.public boolean hasIfIndex()
public int getIfIndex()
public void setIfIndex(int ndx)
ndx
- The new ifIndex.public boolean hasIfIndexChanged()
public boolean updateIfIndex(int newIfIndex)
public char getStatus()
public void setStatus(char status)
status
- The new status.public boolean hasStatusChanged()
public boolean updateStatus(char newStatus)
public char getSource()
public void setSource(char src)
public boolean hasSourceChanged()
public boolean updateSource(char newSource)
public char getNotify()
public void setNotify(char notify)
public boolean hasNotifyChanged()
public boolean updateNotify(char newNotify)
public String getQualifier()
public void setQualifier(String qualifier)
public boolean hasQualifierChanged()
public boolean updateQualifier(String newQualifier)
public void store() throws SQLException
SQLException
public void store(Connection db) throws SQLException
db
- The database connection used to write the record.SQLException
public void store(Connection db, boolean noRollback) throws SQLException
SQLException
public static DbIfServiceEntry create(int nid, InetAddress address, int sid)
store
.address
- The address of the interface.nid
- The node id of the interface.sid
- The service id for the interface.public static DbIfServiceEntry get(int nid, InetAddress addr, int sid) throws SQLException
nid
- The node id keyaddr
- The ip address.sid
- The service id.SQLException
public static DbIfServiceEntry get(Connection db, long nodeId, InetAddress addr, int sid) throws SQLException
db
- The database connection used to load the entry.nodeId
- The node id keyaddr
- The IP address.SQLException
public String toString()
Copyright © 2017. All rights reserved.