private boolean isHrDatastore() {
synchronized (hrDatastoreKnown) {
if (!hrDatastoreKnown) {
ApiProxy.setEnvironmentForCurrentThread(new ToolEnvironment(remoteAppId, "none"));
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
DatastoreType type = datastore.getDatastoreAttributes().getDatastoreType();
hrDatastore = type == DatastoreType.HIGH_REPLICATION;
hrDatastoreKnown = true;
}
return hrDatastore;
}