Package io.ebeaninternal.server.cluster
Class ClusterManager
- java.lang.Object
-
- io.ebeaninternal.server.cluster.ClusterManager
-
- All Implemented Interfaces:
ServerLookup
public class ClusterManager extends Object implements ServerLookup
Manages the cluster service.
-
-
Constructor Summary
Constructors Constructor Description ClusterManager(ContainerConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
broadcast(RemoteTransactionEvent event)
Send the message headers and payload to every server in the cluster.void
cacheClear(String serverName, Class<?> beanType)
Broadcast a cache clear event to the cluster.void
cacheClearAll(String serverName)
Broadcast a cache clear all event to the cluster.EbeanServer
getServer(String name)
Return the EbeanServer instance by name.boolean
isClustering()
Return true if clustering is on.void
registerServer(EbeanServer server)
void
shutdown()
Shutdown the service and Deregister from the cluster.
-
-
-
Constructor Detail
-
ClusterManager
public ClusterManager(ContainerConfig config)
-
-
Method Detail
-
registerServer
public void registerServer(EbeanServer server)
-
getServer
public EbeanServer getServer(String name)
Description copied from interface:ServerLookup
Return the EbeanServer instance by name.- Specified by:
getServer
in interfaceServerLookup
-
cacheClearAll
public void cacheClearAll(String serverName)
Broadcast a cache clear all event to the cluster.
-
cacheClear
public void cacheClear(String serverName, Class<?> beanType)
Broadcast a cache clear event to the cluster.
-
isClustering
public boolean isClustering()
Return true if clustering is on.
-
broadcast
public void broadcast(RemoteTransactionEvent event)
Send the message headers and payload to every server in the cluster.
-
shutdown
public void shutdown()
Shutdown the service and Deregister from the cluster.
-
-