Class RMICacheManagerPeerProvider

    • Field Detail

      • peerUrls

        protected final java.util.Map peerUrls
        Contains a RMI URLs of the form: "//" + hostName + ":" + port + "/" + cacheName;
      • cacheManager

        protected CacheManager cacheManager
        The CacheManager this peer provider is associated with.
    • Constructor Detail

      • RMICacheManagerPeerProvider

        public RMICacheManagerPeerProvider​(CacheManager cacheManager)
        Constructor
        Parameters:
        cacheManager -
      • RMICacheManagerPeerProvider

        public RMICacheManagerPeerProvider()
        Empty constructor
    • Method Detail

      • init

        public abstract void init()
        Notifies providers to initialise themselves.
        Specified by:
        init in interface CacheManagerPeerProvider
      • registerPeer

        public abstract void registerPeer​(java.lang.String rmiUrl)
        Register a new peer
        Specified by:
        registerPeer in interface CacheManagerPeerProvider
        Parameters:
        rmiUrl -
      • stale

        protected abstract boolean stale​(java.util.Date date)
        Whether the entry should be considered stale. This will depend on the type of RMICacheManagerPeerProvider.

        Parameters:
        date - the date the entry was created
        Returns:
        true if stale
      • lookupRemoteCachePeer

        public CachePeer lookupRemoteCachePeer​(java.lang.String url)
                                        throws java.net.MalformedURLException,
                                               java.rmi.NotBoundException,
                                               java.rmi.RemoteException
        The use of one-time registry creation and Naming.rebind should mean we can create as many listeneres as we like. They will simply replace the ones that were there.
        Throws:
        java.net.MalformedURLException
        java.rmi.NotBoundException
        java.rmi.RemoteException
      • getCacheManager

        public final CacheManager getCacheManager()
        The cacheManager this provider is bound to
      • getScheme

        public java.lang.String getScheme()
        The replication scheme. Each peer provider has a scheme name, which can be used to specify the scheme for replication and bootstrap purposes. Each CacheReplicator should lookup the provider for its scheme type during replication. Similarly a BootstrapCacheLoader should also look up the provider for its scheme.

        Specified by:
        getScheme in interface CacheManagerPeerProvider
        Returns:
        the well-known scheme name, which is determined by the replication provider author.
        Since:
        1.6 introduced to permit multiple distribution schemes to be used in the same CacheManager