[
http://jira.jboss.com/jira/browse/JGRP-619?page=comments#action_12388699 ]
Vladimir Blagojevic commented on JGRP-619:
------------------------------------------
getState method should throw TimeoutException and StateTransferException.
We should have only four state installation callbacks:
public void getState(OutputStream ostream) throws Exception;
public void getState(String state_id, OutputStream ostream) throws Exception;
public void setState(InputStream istream) throws Exception;
public void setState(String state_id, InputStream istream) throws Exception;
Implementors are allowed to throw any Exception during installation.
This exception will be wrapped with StateTransferException and throw up
for clients getState call.
Change getState semantics
-------------------------
Key: JGRP-619
URL:
http://jira.jboss.com/jira/browse/JGRP-619
Project: JGroups
Issue Type: Task
Affects Versions: 2.2.9, 2.3, 2.4, 2.5
Reporter: Vladimir Blagojevic
Assigned To: Vladimir Blagojevic
Fix For: 3.0
Currently Channel's getState method returns boolean indicating only whether state was
successfully received by state receiver and not whether it was successfully processed at
relevant channel listener. This anomaly lead convoluted application code that had to do
rather complicated lock synchronization and notification mechanism on the progress of
entire state transfer.
We have to simplify this process! State receiver should simply call blocking getState
and be notified in the form of Exception of anything that went wrong; be it that state
could not be received at all or that it was received but could not be installed at channel
listener.
This issue is closely related to revamping of channel state transfer callbacks - JGRP-563
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira