[jboss-jira] [JBoss JIRA] (JGRP-1941) Fork channels: support state transfer

Bela Ban (JIRA) issues at jboss.org
Thu Jul 16 02:37:03 EDT 2015


Bela Ban created JGRP-1941:
------------------------------

             Summary: Fork channels: support state transfer
                 Key: JGRP-1941
                 URL: https://issues.jboss.org/browse/JGRP-1941
             Project: JGroups
          Issue Type: Feature Request
            Reporter: Bela Ban
            Assignee: Bela Ban
             Fix For: 3.6.5


Currently state transfer is not supported for ForkChannels: {{ForkChannel.getState()}} throws an exception.
State transfer could be implemented by catching events {{STATE_TRANSFER_INPUTSTREAM}} (get-state) and {{STATE_TRANSFER_OUTPUTSTREAM}} (set-state) in {{FORK}}.
When {{getState()}} is called (on the main or fork channel), the state provider gets a get-state in {{FORK}}. It then asks the main channel and all fork channels to write their states to the output stream, as follows:

{noformat}
| main-channel | state | fork-channel1 | state | fork-channel2 | state | ...
{noformat}

This is a list of \{channel-name | state\} pairs, where each state is prefixed with the name of the channel. 
This can be implemented by simply passing the {{STATE_TRANSFER_OUTPUTSTREAM}} event up the main stack and each of its fork stacks.

On the state requester, the {{STATE_TRANSFER_INPUTSTREAM}} event is caught by {{FORK}}. Each \{channel | state\} pair is parsed for the channel name and then the input stream is passed to the corresponding channel for {{setState(InputStream)}} to be invoked.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list