示例#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
 /**
  * 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;
 }