public void save(String id, Metadata value, boolean isNew)
throws BackingStoreException {
//health check done in saveSimple and saveComposite
value.setOwningInstanceName(ReplicationUtil.getInstanceName());
if (value instanceof SimpleMetadata) {
SimpleMetadata smd = (SimpleMetadata) value;
if (smd.getSaveMode() == SimpleMetadata.SAVE_ALL) {
saveSimple(id, smd);
} else if (smd.getSaveMode() == SimpleMetadata.SAVE_TIME_STAMP) {
updateLastAccessTime(id, smd.getLastAccessTime(), smd.getVersion());
} else if (smd.getSaveMode() == SimpleMetadata. SAVE_EP) {
updateContainerExtraParam(id, smd.getLastAccessTime(), smd.getVersion(), smd.getExtraParam());
}
} else {
if (value instanceof CompositeMetadata) {
saveComposite(id, (CompositeMetadata) value);
}