本文整理汇总了Java中org.infinispan.commons.io.ByteBufferFactoryImpl类的典型用法代码示例。如果您正苦于以下问题:Java ByteBufferFactoryImpl类的具体用法?Java ByteBufferFactoryImpl怎么用?Java ByteBufferFactoryImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ByteBufferFactoryImpl类属于org.infinispan.commons.io包,在下文中一共展示了ByteBufferFactoryImpl类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: nukeBuckets
import org.infinispan.commons.io.ByteBufferFactoryImpl; //导入依赖的package包/类
@AfterMethod(alwaysRun = true)
private void nukeBuckets() throws Exception {
for (String name : cacheManager.getCacheNames()) {
CloudStore ccs = new CloudStore();
Cache cache = cacheManager.getCache(name);
ccs.init(new InitializationContextImpl(
cache.getAdvancedCache().getCacheConfiguration().persistence().stores().get(0),
cache,
TestingUtil.extractGlobalMarshaller(cacheManager),
cache.getAdvancedCache().getComponentRegistry().getTimeService(),
new ByteBufferFactoryImpl(),
new MarshalledEntryFactoryImpl()
));
ccs.start();
ccs.removeContainer();
ccs.stop();
}
}
示例2: createStore
import org.infinispan.commons.io.ByteBufferFactoryImpl; //导入依赖的package包/类
@Override
protected AdvancedLoadWriteStore createStore() throws Exception {
clearTempDir();
fcs = new LevelDBStore();
ConfigurationBuilder cb = new ConfigurationBuilder();
LevelDBStoreConfiguration cfg = createCacheStoreConfig(cb.persistence());
fcs.init(new DummyInitializationContext(cfg, getCache(), getMarshaller(), new ByteBufferFactoryImpl(),
new MarshalledEntryFactoryImpl(getMarshaller())));
fcs.start();
return fcs;
}
示例3: objectToBuffer
import org.infinispan.commons.io.ByteBufferFactoryImpl; //导入依赖的package包/类
public ByteBuffer objectToBuffer(Object o) throws IOException, InterruptedException {
byte[] bin = MinimumMarshaller.marshal(o);
ByteBufferFactoryImpl factory = new ByteBufferFactoryImpl();
return factory.newByteBuffer(bin, 0, bin.length);
}