public final class DbIpInterfaceEntry 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 connection 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 |
SNMP_NOT_ELIGIBLE
Deprecated.
Constant
SNMP_NOT_ELIGIBLE='N' |
static char |
SNMP_PRIMARY
Deprecated.
Constant
SNMP_PRIMARY='P' |
static char |
SNMP_SECONDARY
Deprecated.
Constant
SNMP_SECONDARY='S' |
static char |
SNMP_UNKNOWN
Deprecated.
Constant
SNMP_UNKNOWN=' ' |
static char |
STATE_ALIAS
Deprecated.
Constant
STATE_ALIAS='A' |
static char |
STATE_DELETED
Deprecated.
Constant
STATE_DELETED='D' |
static char |
STATE_FORCED
Deprecated.
Constant
STATE_FORCED='F' |
static char |
STATE_MANAGED
Deprecated.
Constant
STATE_MANAGED='M' |
static char |
STATE_NOT_POLLED
Deprecated.
Constant
STATE_NOT_POLLED='N' |
static char |
STATE_REMOTE
Deprecated.
Constant
STATE_REMOTE='X' |
static char |
STATE_UNKNOWN
Deprecated.
Constant
STATE_UNKNOWN=' ' |
static char |
STATE_UNMANAGED
Deprecated.
Constant
STATE_UNMANAGED='U' |
| Modifier and Type | Method and Description |
|---|---|
static DbIpInterfaceEntry |
clone(DbIpInterfaceEntry entry)
Deprecated.
Clones an existing entry.
|
static DbIpInterfaceEntry |
create(int nid,
InetAddress address,
int ifIndex)
Deprecated.
Creates a new entry.
|
static DbIpInterfaceEntry |
create(long l,
InetAddress address)
Deprecated.
Creates a new entry.
|
static DbIpInterfaceEntry |
get(Connection db,
long nid,
InetAddress addr)
Deprecated.
Retrieves a current record from the database based upon the key fields of
nodeID and ipAddr.
|
static DbIpInterfaceEntry |
get(Connection db,
long nid,
InetAddress addr,
int ifIndex)
Deprecated.
Retrieves a current record from the database based upon the key fields of
nodeID and ipAddr.
|
static DbIpInterfaceEntry |
get(int nid,
InetAddress addr)
Deprecated.
Retrieves a current record from the database based upon the key fields of
nodeID and ipAddr.
|
static DbIpInterfaceEntry |
get(int nid,
InetAddress addr,
int ifIndex)
Deprecated.
Retrieves a current record from the database based upon the key fields of
nodeID and ipAddr.
|
String |
getHostname()
Deprecated.
Returns the current hostname.
|
InetAddress |
getIfAddress()
Deprecated.
Returns the name of the distributed poller for the entry.
|
int |
getIfIndex()
Deprecated.
Returns the current ifIndex
|
Timestamp |
getLastPoll()
Deprecated.
Gets the last poll time of the record
|
String |
getLastPollString()
Deprecated.
Gets the last poll time of the record
|
char |
getManagedState()
Deprecated.
Returns the current managed state of the interface
|
long |
getNodeId()
Deprecated.
Returns the node entry's unique identifier.
|
char |
getPrimaryState()
Deprecated.
Returns the current primary state.
|
DbIfServiceEntry[] |
getServices()
Deprecated.
|
DbIfServiceEntry[] |
getServices(Connection db)
Deprecated.
|
int |
getStatus()
Deprecated.
Gets the current operational status field
|
boolean |
hasHostnameChanged()
Deprecated.
|
boolean |
hasIfIndex()
Deprecated.
Returns true if the ifIndex is defined.
|
boolean |
hasIfIndexChanged()
Deprecated.
|
boolean |
hasManagedStateChanged()
Deprecated.
|
boolean |
hasPrimaryStateChanged()
Deprecated.
|
boolean |
hasStatusChanged()
Deprecated.
|
static void |
main(String[] args)
Deprecated.
For debugging only
|
void |
setHostname(String name)
Deprecated.
Sets the current hostname.
|
void |
setIfIndex(int ndx)
Deprecated.
Sets the ifIndex value
|
void |
setLastPoll(Date time)
Deprecated.
Sets the current creation time.
|
void |
setLastPoll(String time)
Deprecated.
Sets the current creation time.
|
void |
setLastPoll(Timestamp time)
Deprecated.
Sets the current creation time.
|
void |
setManagedState(char state)
Deprecated.
Sets the managed state of the instance.
|
void |
setPrimaryState(char state)
Deprecated.
Sets the new primary state.
|
void |
setStatus(int status)
Deprecated.
Sets the current status of the interface
|
void |
store()
Deprecated.
Updates the interface information in the configured database.
|
void |
store(Connection db)
Deprecated.
Updates the interface information in the configured database.
|
String |
toString()
Deprecated.
Creates a string that displays the internal contents of the record.
|
boolean |
updateHostname(String newHostname)
Deprecated.
|
boolean |
updateIfIndex(int newIfIndex)
Deprecated.
|
boolean |
updateManagedState(char newManagedState)
Deprecated.
|
boolean |
updatePrimaryState(char newPrimaryState)
Deprecated.
|
boolean |
updateStatus(int newStatus)
Deprecated.
|
public static final char SNMP_PRIMARY
SNMP_PRIMARY='P'public static final char SNMP_SECONDARY
SNMP_SECONDARY='S'public static final char SNMP_NOT_ELIGIBLE
SNMP_NOT_ELIGIBLE='N'public static final char SNMP_UNKNOWN
SNMP_UNKNOWN=' 'public static final char STATE_MANAGED
STATE_MANAGED='M'public static final char STATE_UNMANAGED
STATE_UNMANAGED='U'public static final char STATE_ALIAS
STATE_ALIAS='A'public static final char STATE_DELETED
STATE_DELETED='D'public static final char STATE_FORCED
STATE_FORCED='F'public static final char STATE_NOT_POLLED
STATE_NOT_POLLED='N'public static final char STATE_REMOTE
STATE_REMOTE='X'public static final char STATE_UNKNOWN
STATE_UNKNOWN=' 'public long getNodeId()
public InetAddress getIfAddress()
public String getLastPollString()
public Timestamp getLastPoll()
public void setLastPoll(String time) throws ParseException
time - The creation time.ParseExceptionpublic void setLastPoll(Date time)
time - The creation time.public void setLastPoll(Timestamp time)
time - The creation 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 String getHostname()
public void setHostname(String name)
name - The new hostnamepublic boolean hasHostnameChanged()
public boolean updateHostname(String newHostname)
public char getManagedState()
public void setManagedState(char state)
state - The new managed statepublic boolean hasManagedStateChanged()
public boolean updateManagedState(char newManagedState)
public int getStatus()
public void setStatus(int status)
status - The new status.public boolean hasStatusChanged()
public boolean updateStatus(int newStatus)
public char getPrimaryState()
public void setPrimaryState(char state)
state - The new primary state.public boolean hasPrimaryStateChanged()
public boolean updatePrimaryState(char newPrimaryState)
public void store()
throws SQLException
SQLExceptionpublic void store(Connection db) throws SQLException
db - The database connection used to write the record.SQLExceptionpublic DbIfServiceEntry[] getServices() throws SQLException
SQLExceptionpublic DbIfServiceEntry[] getServices(Connection db) throws SQLException
SQLExceptionpublic static DbIpInterfaceEntry create(long l, InetAddress address)
store.address - The address of the interface.l - The node id of the interface.public static DbIpInterfaceEntry create(int nid, InetAddress address, int ifIndex)
store.address - The address of the interface.nid - The node id of the interface.ifIndex - The ifindex of the interface.public static DbIpInterfaceEntry clone(DbIpInterfaceEntry entry)
entry - The entry to be clonedpublic static DbIpInterfaceEntry get(int nid, InetAddress addr) throws SQLException
nid - The node id keyaddr - The ip address.SQLExceptionpublic static DbIpInterfaceEntry get(int nid, InetAddress addr, int ifIndex) throws SQLException
nid - The node id keyaddr - The ip address.ifIndex - The interface index.SQLExceptionpublic static DbIpInterfaceEntry get(Connection db, long nid, InetAddress addr) throws SQLException
db - The databse connection used to load the entry.nid - The node id keyaddr - The internet address.SQLExceptionpublic static DbIpInterfaceEntry get(Connection db, long nid, InetAddress addr, int ifIndex) throws SQLException
db - The database connection used to load the entry.nid - The node id keyaddr - The IP address.ifIndex - The interface index.SQLExceptionpublic String toString()
Copyright © 2015. All rights reserved.