Class Subscriber
- java.lang.Object
-
- org.opendaylight.lispflowmapping.interfaces.dao.Subscriber
-
public class Subscriber extends java.lang.Object
Request source RLOC in the mapping service with it's properties.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SUBSCRIBER_TIMEOUT
-
Constructor Summary
Constructors Constructor Description Subscriber(Rloc srcRloc, Eid srcEid, int subscriberTtl)
Constructor.Subscriber(Rloc srcRloc, Eid srcEid, int subscriberTtl, java.util.Date lastRequestDate)
Constructor.Subscriber(SubscriberData subscriberData)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.Date
getLastRequestDate()
Eid
getSrcEid()
Rloc
getSrcRloc()
java.lang.String
getString()
SubscriberData
getSubscriberData()
int
getSubscriberTtl()
int
hashCode()
static int
recordTtlToSubscriberTime(java.lang.Integer recordTtl)
Static method to calculate the subscriber TTL from a mapping record TTL.void
setLastRequestDate(java.util.Date lastRequestDate)
void
setSubscriberTtlByRecordTtl(java.lang.Integer recordTtl)
boolean
timedOut()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Subscriber
public Subscriber(SubscriberData subscriberData)
Constructor.- Parameters:
subscriberData
- YANG modeled SubscriberData object.
-
Subscriber
public Subscriber(Rloc srcRloc, Eid srcEid, int subscriberTtl)
Constructor.- Parameters:
srcRloc
- A source RLOC.srcEid
- A source EID.subscriberTtl
- Subscriber TTL in min(s).
-
-
Method Detail
-
getSubscriberData
public SubscriberData getSubscriberData()
-
getSrcRloc
public Rloc getSrcRloc()
-
getSrcEid
public Eid getSrcEid()
-
getLastRequestDate
public java.util.Date getLastRequestDate()
-
setLastRequestDate
public void setLastRequestDate(java.util.Date lastRequestDate)
-
getSubscriberTtl
public int getSubscriberTtl()
-
setSubscriberTtlByRecordTtl
public void setSubscriberTtlByRecordTtl(java.lang.Integer recordTtl)
-
recordTtlToSubscriberTime
public static int recordTtlToSubscriberTime(java.lang.Integer recordTtl)
Static method to calculate the subscriber TTL from a mapping record TTL. If a mapping record TTL is not provided, use the default 1 day TTL. The subscriber TTL is the TTL plus a constant value.- Parameters:
recordTtl
- The time to live (TTL) value- Returns:
- the subscriber TTL
-
timedOut
public boolean timedOut()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getString
public java.lang.String getString()
-
-