|
SDX Network Information Collector SDK | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.juniper.smgt.gateway.gal.NicKey
public class NicKey
The NicKey
represents the key object passed to all the
lookup methods defined in the NIC or the SaeLocator interface.
Field Summary | |
---|---|
static long |
FOREVER
max time to live, means key does not expire |
static long |
IGNORE_TIME
default max time to live, will be ignored in comparison |
Constructor Summary | |
---|---|
NicKey(java.lang.String aKey)
Constructs a NicKey object given the string representation of the key value. |
Method Summary | |
---|---|
void |
addConstraint(java.lang.String name,
java.lang.String value)
Associates the passed-in constraint information to the current key object. |
int |
compareTo(java.lang.Object anotherKey)
Compares to NicKeys by their time to live attribute. |
boolean |
equals(java.lang.Object o)
NicKeys are equal if they have equal keys and equal constraints |
java.util.SortedMap |
getConstraints()
Returns all the constraints associated with the current key object. |
static long |
getCurrentTimeGMT()
Returns the current time in milliseconds (UTC) in the GMT timezone. |
java.lang.String |
getKey()
Returns the string representation of the key value. |
long |
getTimeToLive()
Returns time to live |
int |
hashCode()
Returns hash code for this NicKey |
boolean |
isOutdated()
Returns true if value is outdated |
long |
setTimeToLive(long keyTimeToLive,
long proxyTimeToLive)
Sets time to live to a min value out of key time and the proxy time to live. |
java.lang.String |
toString()
Returns the string representation for the key and constraints |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long IGNORE_TIME
public static final long FOREVER
Constructor Detail |
---|
public NicKey(java.lang.String aKey)
aKey
- java.lang.StringMethod Detail |
---|
public void addConstraint(java.lang.String name, java.lang.String value)
name
- java.lang.String the constraint name
(should correspond to a NIC data type)value
- String the constraint string valuepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to which to test equality
public java.util.SortedMap getConstraints()
public java.lang.String getKey()
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public long getTimeToLive()
public long setTimeToLive(long keyTimeToLive, long proxyTimeToLive)
keyTimeToLive
- longproxyTimeToLive
- long
public static long getCurrentTimeGMT()
#System.currentTimeMillis
public boolean isOutdated()
proxyTime
- long time to live set on the NicProxy
public int compareTo(java.lang.Object anotherKey)
compareTo
in interface java.lang.Comparable
|
SDX Network Information Collector SDK | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |