add index routing table changed

This commit is contained in:
kimchy 2010-11-09 16:31:21 +02:00
parent d0e0b85178
commit 4695f93276
1 changed files with 10 additions and 0 deletions

View File

@ -60,6 +60,16 @@ public class ClusterChangedEvent {
return state.routingTable() != previousState.routingTable();
}
public boolean indexRoutingTableChanged(String index) {
if (!state.routingTable().hasIndex(index) && !previousState.routingTable().hasIndex(index)) {
return false;
}
if (state.routingTable().hasIndex(index) && previousState.routingTable().hasIndex(index)) {
return state.routingTable().index(index) != previousState.routingTable().index(index);
}
return true;
}
public boolean metaDataChanged() {
return state.metaData() != previousState.metaData();
}