public class RemoteCacheServerFactory extends Object implements IRemoteCacheConstants
CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX, CACHE_SERVER_PREFIX, CUSTOM_RMI_SOCKET_FACTORY_PROPERTY_PREFIX, PROPERTY_PREFIX, REMOTE_ALLOW_CLUSTER_GET, REMOTE_CACHE_SERVICE_NAME, REMOTE_CACHE_SERVICE_PORT, REMOTE_CACHE_SERVICE_VAL, REMOTE_LOCAL_CLUSTER_CONSISTENCY, SOCKET_TIMEOUT_MILLIS, TOMCAT_ON, TOMCAT_XML
Modifier and Type | Method and Description |
---|---|
protected static ICacheEventLogger |
configureCacheEventLogger(Properties props)
Tries to get the event logger.
|
protected static RMISocketFactory |
configureObjectSpecificCustomFactory(Properties props)
This configures an object specific custom factory.
|
protected static RemoteCacheServerAttributes |
configureRemoteCacheServerAttributes(Properties prop)
Configure.
|
static <K,V> RemoteCacheServer<K,V> |
getRemoteCacheServer()
This will allow you to get stats from the server, etc.
|
protected static String |
getServiceName() |
protected static void |
keepAlive(String registryHost,
int registryPort,
ICacheEventLogger cacheEventLogger)
Tries to lookup the server.
|
static void |
main(String[] args)
Creates an local RMI registry on the default port, starts up the remote cache server, and
binds it to the registry.
|
protected static void |
registerServer(String serviceName,
Remote server)
Registers the server with the registry.
|
protected static void |
setServiceName(String serviceName) |
static void |
startup(String host,
int port,
Properties props)
Starts up the remote cache server on this JVM, and binds it to the registry on the given host
and port.
|
public static <K,V> RemoteCacheServer<K,V> getRemoteCacheServer()
A remote cache is either a local cache or a cluster cache.
public static void startup(String host, int port, Properties props) throws IOException
A remote cache is either a local cache or a cluster cache.
host
- port
- props
- IOException
protected static void keepAlive(String registryHost, int registryPort, ICacheEventLogger cacheEventLogger)
registryHost
- - Hostname of the registryregistryPort
- - the port on which to start the registrycacheEventLogger
- the event logger for error messagesprotected static ICacheEventLogger configureCacheEventLogger(Properties props)
props
- configuration propertiesprotected static RMISocketFactory configureObjectSpecificCustomFactory(Properties props)
props
- protected static void registerServer(String serviceName, Remote server) throws RemoteException
serviceName
- the name of the serviceserver
- the server object to bindRemoteException
protected static RemoteCacheServerAttributes configureRemoteCacheServerAttributes(Properties prop)
jcs.remotecache.serverattributes.ATTRIBUTENAME=ATTRIBUTEVALUE
prop
- public static void main(String[] args) throws Exception
A remote cache is either a local cache or a cluster cache.
args
- The command line argumentsException
protected static void setServiceName(String serviceName)
serviceName
- the serviceName to setprotected static String getServiceName()
Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.