本文整理了Java中org.infinispan.client.hotrod.RemoteCacheManager.getMarshaller
方法的一些代码示例,展示了RemoteCacheManager.getMarshaller
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RemoteCacheManager.getMarshaller
方法的具体详情如下:
包路径:org.infinispan.client.hotrod.RemoteCacheManager
类名称:RemoteCacheManager
方法名:getMarshaller
暂无
代码示例来源:origin: wildfly/wildfly
@Override
public Marshaller getMarshaller() {
return this.remoteCacheManager.getMarshaller();
}
代码示例来源:origin: org.wildfly/wildfly-clustering-infinispan-extension
@Override
public Marshaller getMarshaller() {
return this.remoteCacheManager.getMarshaller();
}
代码示例来源:origin: org.infinispan/infinispan-avro-hotrod
protected List<Object> executeQuery() {
List<Object> results;
QueryOperation op = ((OperationsFactory)cache.getOperationsFactory()).newAvroQueryOperation(this);
Response response = op.execute();
results = new ArrayList<>(response.getResults().size());
for (ByteBuffer byteBuffer : response.getResults()) {
try {
results.add(cache.getRemoteCacheManager().getMarshaller().objectFromByteBuffer(byteBuffer.array()));
} catch (IOException | ClassNotFoundException e) {
e.printStackTrace();
}
}
numResults = response.getNumResults();
return results;
}
代码示例来源:origin: org.infinispan.server/infinispan-server-testsuite
public String getStoredKey(RemoteCache cache, String key) throws IOException, InterruptedException {
// 1. marshall the key
// 2. encode it with base64 (that's what DefaultTwoWayKey2StringMapper does)
// 3. prefix it with 8 (again, done by DefaultTwoWayKey2StringMapper to mark the key as wrapped byte array type)
// 4. prefix it with UTF-16 BOM (that is what DefaultTwoWayKey2StringMapper does for non string values)
return '\uFEFF' + "8" + Base64.getEncoder().encodeToString(cache.getRemoteCacheManager().getMarshaller().objectToByteBuffer(key));
}
代码示例来源:origin: org.infinispan.server/infinispan-server-testsuite
public String fromStoredKey(RemoteCache cache, String key) throws IOException, InterruptedException, ClassNotFoundException {
Object o = cache.getRemoteCacheManager().getMarshaller().objectFromByteBuffer(Base64.getDecoder().decode(key.substring(2)));
log.tracef("Key in DB=%s > %s", key, o);
return (String)o;
}
内容来源于网络,如有侵权,请联系作者删除!