|
From: <gal...@jb...> - 2006-06-22 17:24:20
|
I had a bit more look to this and I have this questions:
* Looking at SharedStoreCacheLoader, it seems like it's the cache loader itself that, given a org.jgroups.View and an org.jgroups.Address, decides whether that Address is the coordinator of the View. I don't think it should change now, but don't you think this operation should live in JGroups rather than in JBossCache? JGroups knows these two and I think it should be responsible of being able to determine whether an Address is the coordinator of a View:
Code in SharedStoreCacheLoader:
public void viewChange(View new_view) {
| boolean tmp=active;
| if(new_view != null && local_addr != null) {
| Vector mbrs=new_view.getMembers();
| if(mbrs != null && mbrs.size() > 0 && local_addr.equals(mbrs.firstElement())) {
| tmp=true;
| }
| else {
| tmp=false;
| }
| }
| if(active != tmp) {
| active=tmp;
| log.info("changed mode: active=" + active);
| }
| }
* Configuration wise, I had this two ideas, but I'm not sure which one is preferred, or if there's any other:
<singleton>true</singleton>
| <singleton>false</singleton> (default)
<singleton pushStateWhenCoordinator="true">true</singleton> (pushStateWhenCoordinator defaults to true)
| <singleton pushStateWhenCoordinator="false">true</singleton>
OR:
<singleton />
<singleton>
| <pushStateWhenCoordinator>true</pushStateWhenCoordinator>
| </singleton>
| <singleton>
| <pushStateWhenCoordinator>false</pushStateWhenCoordinator>
| </singleton>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3952752#3952752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3952752
|