本文整理汇总了Java中org.infinispan.commons.marshall.Marshaller类的典型用法代码示例。如果您正苦于以下问题:Java Marshaller类的具体用法?Java Marshaller怎么用?Java Marshaller使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Marshaller类属于org.infinispan.commons.marshall包,在下文中一共展示了Marshaller类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: skipObject
import org.infinispan.commons.marshall.Marshaller; //导入依赖的package包/类
private boolean skipObject(Object obj) {
if (obj instanceof String) {
// this will not cause a memory leak since
// unused interned Strings will be thrown away
if (obj == ((String) obj).intern()) {
return true;
}
}
if (obj instanceof Marshaller || obj instanceof EmbeddedCacheManager || obj instanceof Thread || obj instanceof Log || obj instanceof Logger || obj instanceof SolverContainer) return true;
return (obj == null) || iVisited.containsKey(obj);
}
开发者ID:Jenner4S,项目名称:unitimes,代码行数:12,代码来源:MemoryCounter.java
示例2: bytes2obj
import org.infinispan.commons.marshall.Marshaller; //导入依赖的package包/类
/**
* Byte Array를 객체로 변환
* @param marshaller
* @param bytes
* @param <T>
* @return
*/
@SuppressWarnings("unchecked")
public static <T> T bytes2obj(Marshaller marshaller, byte[] bytes) {
if (bytes == null) return null;
Object object = null;
try {
object = (T) marshaller.objectFromByteBuffer(bytes);
} catch (Exception e) {
e.printStackTrace();
}
return (T) object;
}
开发者ID:opennaru-dev,项目名称:khan-session,代码行数:21,代码来源:MarshallerUtil.java
示例3: obj2bytes
import org.infinispan.commons.marshall.Marshaller; //导入依赖的package包/类
/**
* 객체를 byte array로 변환
*
* @param marshaller
* @param o
* @return
*/
public static byte[] obj2bytes(Marshaller marshaller, Object o) {
try {
return marshaller.objectToByteBuffer(o);
} catch (IOException ioe) {
//throw new IOException("Unable to marshall object of type [" + o.getClass().getName() + "]", ioe);
return null;
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
return null;
}
}
开发者ID:opennaru-dev,项目名称:khan-session,代码行数:19,代码来源:MarshallerUtil.java
示例4: getKey
import org.infinispan.commons.marshall.Marshaller; //导入依赖的package包/类
public K getKey(Marshaller marshaller) {
try {
return (K) marshaller.objectFromByteBuffer(keyBytes);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
开发者ID:infinispan,项目名称:infinispan-cachestore-mongodb,代码行数:9,代码来源:MongoDBEntry.java
示例5: getValue
import org.infinispan.commons.marshall.Marshaller; //导入依赖的package包/类
public V getValue(Marshaller marshaller) {
try {
return (V) marshaller.objectFromByteBuffer(valueBytes);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
开发者ID:infinispan,项目名称:infinispan-cachestore-mongodb,代码行数:9,代码来源:MongoDBEntry.java
示例6: setMarshaller
import org.infinispan.commons.marshall.Marshaller; //导入依赖的package包/类
@Override
public void setMarshaller(Marshaller marshaller) {
}
开发者ID:leads-project,项目名称:infinispan-avro,代码行数:4,代码来源:RemoteValueWrapperInterceptor.java
注:本文中的org.infinispan.commons.marshall.Marshaller类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论