本文整理了Java中org.infinispan.commons.logging.Log.error()
方法的一些代码示例,展示了Log.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.error()
方法的具体详情如下:
包路径:org.infinispan.commons.logging.Log
类名称:Log
方法名:error
暂无
代码示例来源:origin: org.infinispan/infinispan-query
@Override
public Object fromString(String str) {
byte[] objBytes = Base64.getDecoder().decode(str);
try {
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(objBytes));
return ois.readObject();
} catch (IOException | ClassNotFoundException e) {
log.error("Error while decoding object", e);
throw new CacheException(e);
}
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public Object fromString(String encodedObject) {
byte[] objBytes = Base64.getDecoder().decode(encodedObject);
try {
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(objBytes));
return ois.readObject();
} catch (IOException | ClassNotFoundException e) {
log.error("Error while decoding object", e);
throw new CacheException(e);
}
}
代码示例来源:origin: org.infinispan/infinispan-commons
log.error(String.valueOf(source[srcOffset]) + ": " + DECODABET[source[srcOffset]]);
log.error(String.valueOf(source[srcOffset + 1]) + ": " + DECODABET[source[srcOffset + 1]]);
log.error(String.valueOf(source[srcOffset + 2]) + ": " + DECODABET[source[srcOffset + 2]]);
log.error(String.valueOf(source[srcOffset + 3]) + ": " + DECODABET[source[srcOffset + 3]]);
return -1;
代码示例来源:origin: org.infinispan/infinispan-query
@Override
public String toString(Object obj) {
if (obj instanceof Serializable) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(Base64.getEncoder().wrap(baos));
oos.writeObject(obj);
oos.close();
byte[] base64encoded = baos.toByteArray();
return new String(base64encoded, StandardCharsets.UTF_8);
} catch (IOException e) {
log.error("Error while encoding object", e);
throw new CacheException(e);
}
} else {
throw new IllegalArgumentException("Expected " + obj.getClass() + " to be Serializable!");
}
}
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public String toString(Object customType) {
if (customType instanceof Serializable) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(Base64.getEncoder().wrap(baos));
oos.writeObject(customType);
oos.close();
byte[] base64encoded = baos.toByteArray();
try {
return new String(base64encoded, "UTF-8");
} catch (UnsupportedEncodingException ex) {
// highly unlikely in this part of the Universe
return new String(base64encoded);
}
} catch (IOException e) {
log.error("Error while encoding object", e);
throw new CacheException(e);
}
} else {
throw new IllegalArgumentException("Expected " + customType.getClass() + " to be Serializable!");
}
}
}
代码示例来源:origin: org.infinispan/infinispan-server-core
public static void killServer(AbstractProtocolServer<?> server) {
try {
if (server != null) server.stop();
} catch (Throwable t) {
LOG.error("Error stopping server", t);
}
}
代码示例来源:origin: org.infinispan.server/infinispan-server-testsuite
@AfterClass
public static void cleanup() {
/**
* We need to drop the tables, because of DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704
*/
try {
if (dbServer1.bucketTable != null && dbServer1.bucketTable.getConnectionUrl().contains("db2")) {
dbServer1.bucketTable.dropTable();
dbServer2.bucketTable.dropTable();
}
if (dbServer1.stringTable != null && dbServer1.stringTable.getConnectionUrl().contains("db2")) {
dbServer1.stringTable.dropTable();
dbServer2.stringTable.dropTable();
}
} catch (Exception e) {
// catching the exception, because the drop is not part of the tests
log.error("Couldn't drop the tables: ", e);
}
if (rcmFactory != null) {
rcmFactory.stopManagers();
}
rcmFactory = null;
}
内容来源于网络,如有侵权,请联系作者删除!