proj.zoie.store.ZoieStore类的使用及代码示例

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

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

ZoieStore介绍

暂无

代码示例

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

@Override
public String getVersion() {
 return _store.getVersion();
}

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

@Override
public void stop() {
 try {
  _store.close();
 } catch (IOException e) {
  logger.error(e.getMessage(), e);
 }
}

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

@Override
public void start() {
 try {
  _store.open();
 } catch (Exception e) {
  logger.error(e.getMessage(), e);
 }
}

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

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

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

@Override
public void consume(Collection<proj.zoie.api.DataConsumer.DataEvent<D>> data)
  throws ZoieException {
 for (DataEvent<D> datum : data) {
  String version = datum.getVersion();
  D obj = datum.getData();
  try {
   byte[] bytes = _serializer.toBytes(obj);
   long id = _serializer.getUid(obj);
   _store.put(id, bytes, version);
  } catch (Exception e) {
   logger.error(e.getMessage(), e);
  }
 }
}

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

@Override
public byte[] handleQuery() throws Exception {
 long uid = _idArray[_rand.nextInt(_idArray.length)];
 return _store.get(uid);
}

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

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

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

@Override
public void consume(Collection<proj.zoie.api.DataConsumer.DataEvent<D>> data)
  throws ZoieException {
 for (DataEvent<D> datum : data) {
  String version = datum.getVersion();
  D obj = datum.getData();
  try {
   byte[] bytes = _serializer.toBytes(obj);
   long id = _serializer.getUid(obj);
   _store.put(id, bytes, version);
  } catch (Exception e) {
   logger.error(e.getMessage(), e);
  }
 }
}

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

@Override
public String getVersion() {
 return _store.getVersion();
}

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

@Override
public void start() {
 try {
  _store.open();
 } catch (Exception e) {
  logger.error(e.getMessage(), e);
 }
}

代码示例来源: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.senseidb.zoie/zoie-core

@Override
public void stop() {
 try {
  _store.close();
 } catch (IOException e) {
  logger.error(e.getMessage(), e);
 }
}

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

@Override
public void consume(Collection<proj.zoie.api.DataConsumer.DataEvent<D>> data)
    throws ZoieException {
  for (DataEvent<D> datum : data){
    String version = datum.getVersion();
    D obj = datum.getData();
    
    try{
     byte[] bytes = _serializer.toBytes(obj);
     long id = _serializer.getUid(obj);
     _store.put(id, bytes, version);
    }
    catch(Exception e){
     logger.error(e.getMessage(),e);
    }
  }
}

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

@Override
public String getCurrentVersion() {
 return _store.getVersion();
}

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

@Override
public void start() {
  try{
   _store.open();
  }
  catch(Exception e){
   logger.error(e.getMessage(),e);
  }
}

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

@Override
public void stop() {
  try {
    _store.close();
  } catch (IOException e) {
    logger.error(e.getMessage(),e);
  }
}

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

@Override
 public String getVersion() {
   return _store.getVersion();
 }

相关文章