Class ChannelFactory
- java.lang.Object
-
- com.logicaldoc.enterprise.cluster.ChannelFactory
-
public class ChannelFactory extends Object
Factory class to manage all the cluster's communication channels. Every channel is binded to an application's region.- Since:
- 6.4
- Author:
- Marco Meschieri - LogicalDOC
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT
static String
REGION_SYSTEM
-
Constructor Summary
Constructors Constructor Description ChannelFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.jgroups.JChannel
getChannel(String appRegion)
Creates a channel for the cluster.List<String>
getMembers(String region)
Set<String>
getRegions()
void
setConfig(com.logicaldoc.util.config.ContextProperties config)
-
-
-
Field Detail
-
DEFAULT
public static final String DEFAULT
- See Also:
- Constant Field Values
-
REGION_SYSTEM
public static final String REGION_SYSTEM
- See Also:
- Constant Field Values
-
-
Method Detail
-
getChannel
public static org.jgroups.JChannel getChannel(String appRegion)
Creates a channel for the cluster. This method should not be heavily used as the checks and synchronizations will slow the calls. Returned channels can be kept and will be modified directly using the factory-held references, if necessary.The application region is used to determine the protocol configuration to apply.
This method returns a dummy channel if no cluster name has been provided.
- Parameters:
appRegion
- the application region identifier.- Returns:
- Returns a channel
-
setConfig
public void setConfig(com.logicaldoc.util.config.ContextProperties config)
-
-