@Override public String getNodeName() { return persistentStoreType().getId(); }
persistentStore.setConnectionInfo(connectionUri); PersistentStore.PersistentStoreType persistentStoreType = persistentStore.persistentStoreType(); Map persistentStoreMap = objectMapper.convertValue(persistentStore, Map.class); persistentStoreMap.put("enabled", persistentStoreType.equals(persistentStorage.getPersistentStoreType()));
@Override protected void executeThis() { String persistentStoreType = getPersistentStoreType(); String currentDeployment = getCurrentDeployment(); // Disable validation here, since we don't want an illegal config to prevent us from fixing it. PersistentStore persistentStore = new OperationHandler<PersistentStore>() .setFailureMesssage("Failed to get persistent store \"" + persistentStoreType + "\".") .setOperation(Daemon.getPersistentStore(currentDeployment, persistentStoreType, false)) .get(); int originalHash = persistentStore.hashCode(); persistentStore = editPersistentStore((T) persistentStore); if (originalHash == persistentStore.hashCode()) { AnsiUi.failure("No changes supplied."); return; } new OperationHandler<Void>() .setFailureMesssage("Failed to edit persistent store \"" + persistentStoreType + "\".") .setSuccessMessage("Successfully edited persistent store \"" + persistentStoreType + "\".") .setOperation(Daemon.setPersistentStore(currentDeployment, persistentStoreType, !noValidate, persistentStore)) .get(); } }
persistentStore.setConnectionInfo(connectionUri); PersistentStore.PersistentStoreType persistentStoreType = persistentStore.persistentStoreType(); Map persistentStoreMap = objectMapper.convertValue(persistentStore, Map.class); persistentStoreMap.put("enabled", persistentStoreType.equals(persistentStorage.getPersistentStoreType()));
@Override protected void executeThis() { String persistentStoreType = getPersistentStoreType(); String currentDeployment = getCurrentDeployment(); // Disable validation here, since we don't want an illegal config to prevent us from fixing it. PersistentStore persistentStore = new OperationHandler<PersistentStore>() .setFailureMesssage("Failed to get persistent store \"" + persistentStoreType + "\".") .setOperation(Daemon.getPersistentStore(currentDeployment, persistentStoreType, false)) .get(); int originalHash = persistentStore.hashCode(); persistentStore = editPersistentStore((T) persistentStore); if (originalHash == persistentStore.hashCode()) { AnsiUi.failure("No changes supplied."); return; } new OperationHandler<Void>() .setFailureMesssage("Failed to edit persistent store \"" + persistentStoreType + "\".") .setSuccessMessage("Successfully edited persistent store \"" + persistentStoreType + "\".") .setOperation(Daemon.setPersistentStore(currentDeployment, persistentStoreType, !noValidate, persistentStore)) .get(); } }
@Override public String getNodeName() { return persistentStoreType().getId(); }
public void setPersistentStore(String deploymentName, PersistentStore newPersistentStore) { PersistentStorage persistentStorage = getPersistentStorage(deploymentName); switch (newPersistentStore.persistentStoreType()) { case S3: persistentStorage.setS3((S3PersistentStore) newPersistentStore); break; case GCS: persistentStorage.setGcs((GcsPersistentStore) newPersistentStore); break; case AZS: persistentStorage.setAzs((AzsPersistentStore) newPersistentStore); break; case ORACLE: persistentStorage.setOracle((OraclePersistentStore) newPersistentStore); break; case ORACLEBMCS: persistentStorage.setOraclebmcs((OracleBMCSPersistentStore) newPersistentStore); break; default: throw new RuntimeException("Unknown persistent store " + newPersistentStore.persistentStoreType()); } }
public void setPersistentStore(String deploymentName, PersistentStore newPersistentStore) { PersistentStorage persistentStorage = getPersistentStorage(deploymentName); switch (newPersistentStore.persistentStoreType()) { case S3: persistentStorage.setS3((S3PersistentStore) newPersistentStore); break; case GCS: persistentStorage.setGcs((GcsPersistentStore) newPersistentStore); break; case AZS: persistentStorage.setAzs((AzsPersistentStore) newPersistentStore); break; case ORACLE: persistentStorage.setOracle((OraclePersistentStore) newPersistentStore); break; case ORACLEBMCS: persistentStorage.setOraclebmcs((OracleBMCSPersistentStore) newPersistentStore); break; default: throw new RuntimeException("Unknown persistent store " + newPersistentStore.persistentStoreType()); } }