proj.zoie.api.ZoieException类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中proj.zoie.api.ZoieException类的一些代码示例,展示了ZoieException类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoieException类的具体详情如下:
包路径:proj.zoie.api.ZoieException
类名称:ZoieException

ZoieException介绍

[英]A Zoie-specific exception.
[中]Zoie特有的例外。

代码示例

代码示例来源:origin: senseidb/zoie

public void flushEvents() throws ZoieException {
 try {
  _store.commit();
 } catch (Exception e) {
  throw new ZoieException(e.getMessage(), e);
 }
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

private void flush() {
 // FLUSH
 Collection<DataEvent<D>> tmp;
 tmp = _batch;
 _batch = new LinkedList<DataEvent<D>>();
 try {
  if (_dataProvider._consumer != null) {
   int batchSize = tmp.size();
   _dataProvider._consumer.consume(tmp);
   _eventCount.getAndAdd(batchSize);
   updateStats();
  }
 } catch (ZoieException e) {
  log.error(e.getMessage(), e);
 }
 _lastFlushTime = System.currentTimeMillis();
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

public void flushEvents() throws ZoieException {
 try {
  _store.commit();
 } catch (Exception e) {
  throw new ZoieException(e.getMessage(), e);
 }
}

代码示例来源:origin: senseidb/zoie

private void flush() {
 // FLUSH
 Collection<DataEvent<D>> tmp;
 tmp = _batch;
 _batch = new LinkedList<DataEvent<D>>();
 try {
  if (_dataProvider._consumer != null) {
   int batchSize = tmp.size();
   _dataProvider._consumer.consume(tmp);
   _eventCount.getAndAdd(batchSize);
   updateStats();
  }
 } catch (ZoieException e) {
  log.error(e.getMessage(), e);
 }
 _lastFlushTime = System.currentTimeMillis();
}

代码示例来源:origin: com.linkedin.zoie/zoie-core

public void flushEvents() throws ZoieException {
  try{
  _store.commit();
 }
 catch(Exception e){
  throw new ZoieException(e.getMessage(),e);
 }
}

代码示例来源:origin: com.linkedin.zoie/zoie-core

private void flush()
{
 // FLUSH
 Collection<DataEvent<D>> tmp;
 tmp = _batch;
 _batch = new LinkedList<DataEvent<D>>();
 try
 {
  if (_dataProvider._consumer != null)
  {
   int batchSize = tmp.size();
   _dataProvider._consumer.consume(tmp);
   _eventCount.getAndAdd(batchSize);
   updateStats();
  }
 } catch (ZoieException e)
 {
  log.error(e.getMessage(), e);
 }
}

代码示例来源:origin: senseidb/zoie

@Override
public void refreshCache(long timeout) throws ZoieException {
 long begintime = System.currentTimeMillis();
 while (cachedreaderTimestamp <= begintime) {
  synchronized (cachemonitor) {
   cachemonitor.notifyAll();
   long elapsed = System.currentTimeMillis() - begintime;
   if (elapsed > timeout) {
    log.debug("refreshCached reader timeout in " + elapsed + "ms");
    throw new ZoieException("refreshCached reader timeout in " + elapsed + "ms");
   }
   long timetowait = Math.min(timeout - elapsed, 200);
   try {
    cachemonitor.wait(timetowait);
   } catch (InterruptedException e) {
    log.warn("refreshCache", e);
   }
  }
 }
}

代码示例来源:origin: senseidb/zoie

} catch (ZoieException e) {
 ZoieHealth.setFatal();
 log.error(e.getMessage(), e);
} finally {
 long t2 = System.currentTimeMillis();

代码示例来源:origin: com.senseidb.zoie/zoie-core

@Override
public void refreshCache(long timeout) throws ZoieException {
 long begintime = System.currentTimeMillis();
 while (cachedreaderTimestamp <= begintime) {
  synchronized (cachemonitor) {
   cachemonitor.notifyAll();
   long elapsed = System.currentTimeMillis() - begintime;
   if (elapsed > timeout) {
    log.debug("refreshCached reader timeout in " + elapsed + "ms");
    throw new ZoieException("refreshCached reader timeout in " + elapsed + "ms");
   }
   long timetowait = Math.min(timeout - elapsed, 200);
   try {
    cachemonitor.wait(timetowait);
   } catch (InterruptedException e) {
    log.warn("refreshCache", e);
   }
  }
 }
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

} catch (ZoieException e) {
 ZoieHealth.setFatal();
 log.error(e.getMessage(), e);
} finally {
 long t2 = System.currentTimeMillis();

代码示例来源:origin: senseidb/zoie

@Override
public void refreshCache(long timeout) throws ZoieException {
 long begintime = System.currentTimeMillis();
 while (cachedreaderTimestamp <= begintime) {
  synchronized (cachemonitor) {
   cachemonitor.notifyAll();
   long elapsed = System.currentTimeMillis() - begintime;
   if (elapsed > timeout) {
    log.debug("refreshCached reader timeout in " + elapsed + "ms");
    throw new ZoieException("refreshCached reader timeout in " + elapsed + "ms");
   }
   long timetowait = Math.min(timeout - elapsed, 200);
   try {
    cachemonitor.wait(timetowait);
   } catch (InterruptedException e) {
    log.warn("refreshCache", e);
   }
  }
 }
}

代码示例来源:origin: com.linkedin.zoie/zoie-core

log.error(e.getMessage(),e);

代码示例来源:origin: com.senseidb.zoie/zoie-core

@Override
public void refreshCache(long timeout) throws ZoieException {
 long begintime = System.currentTimeMillis();
 while (cachedreaderTimestamp <= begintime) {
  synchronized (cachemonitor) {
   cachemonitor.notifyAll();
   long elapsed = System.currentTimeMillis() - begintime;
   if (elapsed > timeout) {
    log.debug("refreshCached reader timeout in " + elapsed + "ms");
    throw new ZoieException("refreshCached reader timeout in " + elapsed + "ms");
   }
   long timetowait = Math.min(timeout - elapsed, 200);
   try {
    cachemonitor.wait(timetowait);
   } catch (InterruptedException e) {
    log.warn("refreshCache", e);
   }
  }
 }
}

代码示例来源:origin: com.linkedin.zoie/zoie-core

log.error(e.getMessage(),e);

代码示例来源:origin: senseidb/zoie

/**
 * Wait for timeOut amount of time for the indexing thread to process data events.
 * If there are still remaining unprocessed events by the end of timeOut duration,
 * a ZoieException is thrown.
 * @param timeOut a timeout value in milliseconds.
 * @throws ZoieException
 */
public void flushEvents(long timeOut) throws ZoieException {
 synchronized (this) {
  while (_eventCount > 0) {
   _flush = true;
   this.notifyAll();
   long now1 = System.currentTimeMillis();
   if (timeOut <= 0) {
    log.error("sync timed out");
    throw new ZoieException("timed out");
   }
   try {
    long waittime = Math.min(200, timeOut);
    this.wait(waittime);
   } catch (InterruptedException e) {
    throw new ZoieException(e.getMessage());
   }
   long now2 = System.currentTimeMillis();
   timeOut -= (now2 - now1);
  }
 }
}

代码示例来源:origin: senseidb/zoie

break;
} catch (ZoieException e) {
 if (e.getMessage().indexOf("timed out") < 0) {
  break;
 } else {

代码示例来源:origin: com.senseidb.zoie/zoie-core

/**
 * Wait for timeOut amount of time for the indexing thread to process data events.
 * If there are still remaining unprocessed events by the end of timeOut duration,
 * a ZoieException is thrown.
 * @param timeOut a timeout value in milliseconds.
 * @throws ZoieException
 */
public void flushEvents(long timeOut) throws ZoieException {
 synchronized (this) {
  while (_eventCount > 0) {
   _flush = true;
   this.notifyAll();
   long now1 = System.currentTimeMillis();
   if (timeOut <= 0) {
    log.error("sync timed out");
    throw new ZoieException("timed out");
   }
   try {
    long waittime = Math.min(200, timeOut);
    this.wait(waittime);
   } catch (InterruptedException e) {
    throw new ZoieException(e.getMessage());
   }
   long now2 = System.currentTimeMillis();
   timeOut -= (now2 - now1);
  }
 }
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

break;
} catch (ZoieException e) {
 if (e.getMessage().indexOf("timed out") < 0) {
  break;
 } else {

代码示例来源:origin: com.senseidb.zoie/zoie-core

public void syncWithVersion(long timeInMillis, String version) throws ZoieException {
 if (version == null) return;
 long now = System.currentTimeMillis();
 long due = now + timeInMillis;
 synchronized (this) {
  try {
   while (_flushedVersion == null
     || _versionComparator.compare(_flushedVersion, version) < 0) {
    if (now >= due) {
     throw new ZoieException("sync timed out");
    }
    try {
     this.notifyAll();
     _flushing = true;
     this.wait(Math.min(due - now, 200));
    } catch (InterruptedException e) {
     log.warn(e.getMessage(), e);
    }
    now = System.currentTimeMillis();
   }
  } finally {
   _flushing = false;
  }
 }
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

break;
} catch (ZoieException e) {
 if (e.getMessage().indexOf("timed out") < 0) {
  break;
 } else {

相关文章

ZoieException类方法