Hosts can be in three different levels of conformance with the Multicast specification (RFC1112), according to the requirements they meet.
The list of CachePeers is maintained via heartbeats. rmiUrls are looked up using RMI and converted to CachePeers on registration. On lookup any stale references are removed.
| Modifier and Type | Class and Description |
|---|---|
| protected static class | MulticastRMICacheManagerPeerProvider.CachePeerEntry
Entry containing a looked up CachePeer and date |
| Modifier and Type | Field and Description |
|---|---|
| private final MulticastKeepaliveHeartbeatReceiver | |
| private final MulticastKeepaliveHeartbeatSender | |
| private static final Logger | |
| protected static final int | SHORT_DELAY
One tenth of a second, in ms |
| Access | Constructor and Description |
|---|---|
| public | MulticastRMICacheManagerPeerProvider(CacheManager cacheManager, InetAddress
224.0.0.1 to 239.255.255.255 e.g. 230.0.0.1 groupMulticastAddress, Integer 1025 to 65536 e.g. 4446 groupMulticastPort, Integer timeToLive, InetAddress the address of the interface to use for sending and receiving multicast. May be null. hostAddress)Creates and starts a multicast peer provider |
| heartBeatReceiver | back to summary |
|---|---|
| private final MulticastKeepaliveHeartbeatReceiver heartBeatReceiver | |
| heartBeatSender | back to summary |
|---|---|
| private final MulticastKeepaliveHeartbeatSender heartBeatSender | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG Hides net. | |
| SHORT_DELAY | back to summary |
|---|---|
| protected static final int SHORT_DELAY One tenth of a second, in ms | |
| MulticastRMICacheManagerPeerProvider | back to summary |
|---|---|
| public MulticastRMICacheManagerPeerProvider(CacheManager cacheManager, InetAddress groupMulticastAddress, Integer groupMulticastPort, Integer timeToLive, InetAddress hostAddress) Creates and starts a multicast peer provider
| |
| dispose | back to summary |
|---|---|
| public final void dispose() Overrides net. Implements net. Shutdown the heartbeat | |
| getHeartBeatReceiver | back to summary |
|---|---|
public MulticastKeepaliveHeartbeatReceiver getHeartBeatReceiver()
| |
| getHeartBeatSender | back to summary |
|---|---|
public MulticastKeepaliveHeartbeatSender getHeartBeatSender()
| |
| getStaleTime | back to summary |
|---|---|
| protected long getStaleTime() The time after which an unrefreshed peer provider entry is considered stale. | |
| getTimeForClusterToForm | back to summary |
|---|---|
| public long getTimeForClusterToForm() Implements net. Time for a cluster to form. This varies considerably, depending on the implementation.
| |
| init | back to summary |
|---|---|
| public final void init() throws CacheException Implements abstract net. Implements net. Doc from net. Notifies providers to initialise themselves. | |
| listRemoteCachePeers | back to summary |
|---|---|
| public final synchronized List Implements abstract net. Implements net. | |
| registerPeer | back to summary |
|---|---|
| public final void registerPeer(String rmiUrl) Implements abstract net. Implements net. Register a new peer, but only if the peer is new, otherwise the last seen timestamp is updated. This method is thread-safe. It relies on peerUrls being a synchronizedMap | |
| stale | back to summary |
|---|---|
| protected final boolean stale(Date date) Implements abstract net. Whether the entry should be considered stale. This will depend on the type of RMICacheManagerPeerProvider. This method should be overridden for implementations that go stale based on date
| |
| Access | Constructor and Description |
|---|---|
| public | CachePeerEntry(CachePeer
the cache peer part of this entry cachePeer, Date the date part of this entry date)Constructor |
| cachePeer | back to summary |
|---|---|
| private final CachePeer cachePeer | |
| date | back to summary |
|---|---|
| private Date date | |
| CachePeerEntry | back to summary |
|---|---|
| public CachePeerEntry(CachePeer cachePeer, Date date) Constructor | |
| getCachePeer | back to summary |
|---|---|
public final CachePeer getCachePeer()
| |
| getDate | back to summary |
|---|---|
public final Date getDate()
| |