org.apache.sling.discovery.impl.topology.announcement
Class CachedAnnouncement

java.lang.Object
  extended by org.apache.sling.discovery.impl.topology.announcement.CachedAnnouncement

public class CachedAnnouncement
extends Object

With SLING-3389 the Announcement itself doesn't use the created (ie timeout) field anymore (it still has it currently for backwards compatibility on the wire-level) - hence that's why there's this small in-memory wrapper object which contains an Announcement and carries a lastHeartbeat property.


Method Summary
 Announcement getAnnouncement()
           
 long getLastHeartbeat()
           
 long getSecondsUntilTimeout()
          Returns the second until the next heartbeat is expected, otherwise the timeout will hit
 boolean hasExpired()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasExpired

public final boolean hasExpired()

getLastHeartbeat

public final long getLastHeartbeat()

getSecondsUntilTimeout

public final long getSecondsUntilTimeout()
Returns the second until the next heartbeat is expected, otherwise the timeout will hit


getAnnouncement

public final Announcement getAnnouncement()


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.