Re: [jgroups-users] ReplicatedHashMap and ForkChannel

Questions/problems related to using JGroups <[email protected]> Wed, 19 Oct 2016 09:17:47 +0200
Newsgroups gmane.comp.java.javagroups.general
Message-ID <[email protected]>
No, this is supported since [1]. Take a look at 
ForkChannelTest.testStateTransfer() in the code base.

The downside is that a ForkChannel.getState() causes state transfer to 
happen for *all* fork channels over the same main channel, so this is 
meant to be called when the main channel and all fork channels have been 
created and connected.

[1] https://issues.jboss.org/browse/JGRP-1941

On 18/10/16 20:19, Questions/problems related to using JGroups wrote:
> As I read the code, there is no way for a ReplacedHashMap to work on
> a ForkChannel.  Is this right?  Or at least you can't have the
> STATE_TRANSFER on the fork.  The ForkChannel.getState(...) just calls
> the main_channel method.  Even if the STATE_TRANSFER is on the main
> channel, my replicatedHashMap.start() is timing out even though I
> have very little data.
>
> Has anyone gotten this to work?  I've attached my stack.  My
> ReplacedHashMap is built with the following code which attaches to
> the main stack:
>
> ForkChannel forkChannel = new ForkChannel(jchannel, forkName,
> channelName, new STATE_TRANSFER());
> forkChannel.connect(jchannel.getClusterName()); ReplicatedHashMap<K,
> V> map = new ReplicatedHashMap<>(forkChannel); map.start(10000);
>
> Thanks much in advance, gray


-- 
Bela Ban, JGroups lead (http://www.jgroups.org)


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot