ehcache

net.sf.ehcache.distribution
Class RMICacheManagerPeerListenerFactory

java.lang.Object
  extended by net.sf.ehcache.distribution.CacheManagerPeerListenerFactory
      extended by net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory

public class RMICacheManagerPeerListenerFactory
extends CacheManagerPeerListenerFactory

Builds a listener based on RMI.

Expected configuration line:

<cachePeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory" properties="hostName=localhost, port=5000" />

Version:
$Id: RMICacheManagerPeerListenerFactory.java 5594 2012-05-07 16:04:31Z cdennis $
Author:
Greg Luck

Field Summary
static Integer DEFAULT_SOCKET_TIMEOUT_MILLIS
          The default timeout for cache replication for a single replication action.
 
Constructor Summary
RMICacheManagerPeerListenerFactory()
           
 
Method Summary
 CacheManagerPeerListener createCachePeerListener(CacheManager cacheManager, Properties properties)
          Creates a peer provider.
protected  CacheManagerPeerListener doCreateCachePeerListener(String hostName, Integer port, Integer remoteObjectPort, CacheManager cacheManager, Integer socketTimeoutMillis)
          A template method to actually create the factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SOCKET_TIMEOUT_MILLIS

public static final Integer DEFAULT_SOCKET_TIMEOUT_MILLIS
The default timeout for cache replication for a single replication action. This may need to be increased for large data transfers.

Constructor Detail

RMICacheManagerPeerListenerFactory

public RMICacheManagerPeerListenerFactory()
Method Detail

createCachePeerListener

public final CacheManagerPeerListener createCachePeerListener(CacheManager cacheManager,
                                                              Properties properties)
                                                       throws CacheException
Description copied from class: CacheManagerPeerListenerFactory
Creates a peer provider.

Specified by:
createCachePeerListener in class CacheManagerPeerListenerFactory
Parameters:
properties - implementation specific properties. These are configured as comma separated name value pairs in ehcache.xml
cacheManager - the CacheManager instance connected to this peer provider
Returns:
a constructed CacheManagerPeerProvider
Throws:
CacheException

doCreateCachePeerListener

protected CacheManagerPeerListener doCreateCachePeerListener(String hostName,
                                                             Integer port,
                                                             Integer remoteObjectPort,
                                                             CacheManager cacheManager,
                                                             Integer socketTimeoutMillis)
A template method to actually create the factory

Parameters:
hostName -
port -
remoteObjectPort -
cacheManager -
socketTimeoutMillis - @return a crate CacheManagerPeerListener

ehcache

Copyright 2001-2014, Terracotta, Inc.