@Override public void run() { writeAll(); } }
/** Write information about all of the member to file (only if I'm the coord) */ protected void writeAll() { writeAll(null); }
@ManagedOperation(description="Causes the member to write its own information into the DB, replacing an existing entry") public void writeInfo() {if(is_coord) writeAll();}
protected void handleView(View new_view, View old_view, boolean coord_changed) { if(is_coord) { if(coord_changed) { if(remove_all_data_on_view_change) removeAll(cluster_name); else if(remove_old_coords_on_view_change) { Address old_coord=old_view != null? old_view.getCreator() : null; if(old_coord != null) remove(cluster_name, old_coord); } } Address[] left=View.diff(old_view, new_view)[1]; if(coord_changed || update_store_on_view_change || left.length > 0) { writeAll(left); if(remove_all_data_on_view_change || remove_old_coords_on_view_change) startInfoWriter(); } } else if(coord_changed) // I'm no longer the coordinator remove(cluster_name, local_addr); }
&& !initial_discovery && is_coord && (data == null || !data.isCoord()) && !isInfoWriterRunning()) { writeAll();
@Override public void run() { writeAll(); } }
/** Write information about all of the member to file (only if I'm the coord) */ protected void writeAll() { writeAll(null); }
@ManagedOperation(description="Causes the member to write its own information into the DB, replacing an existing entry") public void writeInfo() {if(is_coord) writeAll();}
protected void handleView(View new_view, View old_view, boolean coord_changed) { if(is_coord) { if(coord_changed) { if(remove_all_data_on_view_change) removeAll(cluster_name); else if(remove_old_coords_on_view_change) { Address old_coord=old_view != null? old_view.getCreator() : null; if(old_coord != null) remove(cluster_name, old_coord); } } Address[] left=View.diff(old_view, new_view)[1]; if(coord_changed || update_store_on_view_change || left.length > 0) { writeAll(left); if(remove_all_data_on_view_change || remove_old_coords_on_view_change) startInfoWriter(); } } else if(coord_changed) // I'm no longer the coordinator remove(cluster_name, local_addr); }