Package org.infinispan.server.jgroups
Class JChannelFactory
- java.lang.Object
-
- org.infinispan.server.jgroups.JChannelFactory
-
- All Implemented Interfaces:
ChannelFactory,ChannelFactory,org.jgroups.conf.ProtocolStackConfigurator
public class JChannelFactory extends Object implements ChannelFactory, org.jgroups.conf.ProtocolStackConfigurator
Factory for creating fork-able channels.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description JChannelFactory(ProtocolStackConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jgroups.JChannelcreateChannel(String id)Creates a JGroups channelList<org.jgroups.conf.ProtocolConfiguration>getProtocolStack()ProtocolStackConfigurationgetProtocolStackConfiguration()Returns the protocol stack configuration of this channel factory.StringgetProtocolStackString()booleanisUnknownForkResponse(ByteBuffer buffer)Determines whether or not the specified message response indicates the fork stack or fork channel required to handle a request does not exist on the recipient node.
-
-
-
Constructor Detail
-
JChannelFactory
public JChannelFactory(ProtocolStackConfiguration configuration)
-
-
Method Detail
-
getProtocolStackConfiguration
public ProtocolStackConfiguration getProtocolStackConfiguration()
Description copied from interface:ChannelFactoryReturns the protocol stack configuration of this channel factory.- Specified by:
getProtocolStackConfigurationin interfaceChannelFactory- Returns:
- the protocol stack configuration of this channel factory
-
createChannel
public org.jgroups.JChannel createChannel(String id) throws Exception
Description copied from interface:ChannelFactoryCreates a JGroups channel- Specified by:
createChannelin interfaceChannelFactory- Parameters:
id- the unique identifier of this channel- Returns:
- a JGroups channel
- Throws:
Exception- if there was a failure setting up the protocol stack
-
isUnknownForkResponse
public boolean isUnknownForkResponse(ByteBuffer buffer)
Description copied from interface:ChannelFactoryDetermines whether or not the specified message response indicates the fork stack or fork channel required to handle a request does not exist on the recipient node.- Specified by:
isUnknownForkResponsein interfaceChannelFactory- Parameters:
buffer- a message response- Returns:
- true, if the response indicates a missing fork stack or channel.
-
getProtocolStackString
public String getProtocolStackString()
- Specified by:
getProtocolStackStringin interfaceorg.jgroups.conf.ProtocolStackConfigurator- See Also:
ProtocolStackConfigurator.getProtocolStackString()
-
getProtocolStack
public List<org.jgroups.conf.ProtocolConfiguration> getProtocolStack()
- Specified by:
getProtocolStackin interfaceorg.jgroups.conf.ProtocolStackConfigurator- See Also:
ProtocolStackConfigurator.getProtocolStack()
-
-