Revision 6494
Added by ben leinfelder over 13 years ago
src/edu/ucsb/nceas/metacat/IdentifierManager.java | ||
---|---|---|
1242 | 1242 |
List<String> nodes = null; |
1243 | 1243 |
String policy = null; |
1244 | 1244 |
|
1245 |
nodes = new ArrayList<String>(); |
|
1246 |
policy = "blocked"; |
|
1247 |
for (NodeReference node: replicationPolicy.getBlockedMemberNodeList()) { |
|
1248 |
nodes.add(node.getValue()); |
|
1245 |
// check for null |
|
1246 |
if (replicationPolicy.getBlockedMemberNodeList() != null) { |
|
1247 |
nodes = new ArrayList<String>(); |
|
1248 |
policy = "blocked"; |
|
1249 |
for (NodeReference node: replicationPolicy.getBlockedMemberNodeList()) { |
|
1250 |
nodes.add(node.getValue()); |
|
1251 |
} |
|
1252 |
this.insertReplicationPolicy(guid, policy, nodes); |
|
1249 | 1253 |
} |
1250 |
this.insertReplicationPolicy(guid, policy, nodes); |
|
1251 | 1254 |
|
1252 |
nodes = new ArrayList<String>(); |
|
1253 |
policy = "preferred"; |
|
1254 |
for (NodeReference node: replicationPolicy.getPreferredMemberNodeList()) { |
|
1255 |
nodes.add(node.getValue()); |
|
1255 |
if (replicationPolicy.getPreferredMemberNodeList() != null) { |
|
1256 |
nodes = new ArrayList<String>(); |
|
1257 |
policy = "preferred"; |
|
1258 |
for (NodeReference node: replicationPolicy.getPreferredMemberNodeList()) { |
|
1259 |
nodes.add(node.getValue()); |
|
1260 |
} |
|
1261 |
this.insertReplicationPolicy(guid, policy, nodes); |
|
1256 | 1262 |
} |
1257 |
this.insertReplicationPolicy(guid, policy, nodes); |
|
1258 | 1263 |
} |
1259 | 1264 |
|
1260 | 1265 |
// save replica information |
Also available in: Unified diff
more stringent NP checking when saving replication policy