class WorkerRegister extends Configured {

  public static WorkerRegister getWorkerRegister(Configuration conf) throws IOException {
    String workerRegisterCls = conf.get(TransactionConstant.WORKER_REGISTER_CLASS_KEY,
      TransactionConstant.DEFAULT_WORKER_REISTER_CLASS);
    if (register == null) {
      synchronized (registerLock) {
        if (register == null) {
          try {
            register = (WorkerRegister) (Class.forName(workerRegisterCls).getConstructor(Configuration.class)
                .newInstance(conf));
          } catch (Exception e) {
            LOG.fatal("create workerRegister fail", e);
            throw new IOException(e);
          }          
        }
      }
    }
    return register;
  }

  public  WorkerRegister(Configuration conf);

}