本文整理匯總了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);
}