Package org.apache.sling.discovery.base.connectors.announcement

# Class CachedAnnouncement

java.lang.Object
org.apache.sling.discovery.base.connectors.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

Modifier and Type
Method
Description
`final Announcement`
`getAnnouncement()`
`final long`
`getFirstPing()`
`final long`
`getLastPing()`
`final long`
`getSecondsUntilTimeout()`
Returns the second until the next heartbeat is expected, otherwise the timeout will hit
`final boolean`
`hasExpired()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### hasExpired

public final boolean hasExpired()

### getLastPing

public final long getLastPing()

### getFirstPing

public final long getFirstPing()

### getSecondsUntilTimeout

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

### getAnnouncement

public final Announcement getAnnouncement()