Search in sources :

Example 1 with WorkloadRecordStoreFactory

use of com.yahoo.athenz.common.server.workload.WorkloadRecordStoreFactory in project athenz by yahoo.

the class InstanceCertManager method loadWorkloadObjectStore.

private void loadWorkloadObjectStore(PrivateKeyStore keyStore) {
    String workloadRecordStoreFactoryClass = System.getProperty(ZTSConsts.ZTS_PROP_WORKLOAD_RECORD_STORE_FACTORY_CLASS);
    if (workloadRecordStoreFactoryClass == null || workloadRecordStoreFactoryClass.isEmpty()) {
        return;
    }
    WorkloadRecordStoreFactory workloadRecordStoreFactory;
    try {
        workloadRecordStoreFactory = (WorkloadRecordStoreFactory) Class.forName(workloadRecordStoreFactoryClass).newInstance();
    } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
        LOGGER.error("Invalid WorkloadRecordStoreFactory class: {} error: {}", workloadRecordStoreFactoryClass, e.getMessage());
        throw new IllegalArgumentException("Invalid workload record store factory class");
    }
    // create our workload record store instance
    workloadStore = workloadRecordStoreFactory.create(keyStore);
}
Also used : WorkloadRecordStoreFactory(com.yahoo.athenz.common.server.workload.WorkloadRecordStoreFactory)

Aggregations

WorkloadRecordStoreFactory (com.yahoo.athenz.common.server.workload.WorkloadRecordStoreFactory)1