예제 #1
0
 public void fromMap(Map<String, Object> m) {
   super.fromMap(m);
   String cls = Objects.get(String.class, m, "dataSource");
   try {
     setDataSource((Class<? extends DistributedDataSource>) Class.forName(cls));
   } catch (Throwable e) {
     throw S1SystemError.wrap(e);
   }
 }
예제 #2
0
파일: Loggers.java 프로젝트: s1-platform/s1
 /**
  * Get log storage
  *
  * @return
  */
 public static synchronized LogStorage getLogStorage() {
   if (storage == null) {
     String cls = Options.getStorage().getSystem("log.storageClass", LogStorage.class.getName());
     try {
       storage = (LogStorage) Class.forName(cls).newInstance();
     } catch (Exception e) {
       throw S1SystemError.wrap(e);
     }
   }
   return storage;
 }