use of org.apache.ignite.marshaller.MarshallerContext in project ignite by apache.
the class GridCacheEntryMemorySizeSelfTest method createMarshaller.
/**
* Creates an instance of Marshaller that is used by caches during the test run.
*
* @return Marshaller.
*/
protected Marshaller createMarshaller() throws IgniteCheckedException {
Marshaller marsh = createStandaloneBinaryMarshaller();
marsh.setContext(new MarshallerContext() {
@Override
public boolean registerClassName(byte platformId, int typeId, String clsName) {
return true;
}
@Override
public Class getClass(int typeId, ClassLoader ldr) {
throw new UnsupportedOperationException();
}
@Override
public String getClassName(byte platformId, int typeId) {
throw new UnsupportedOperationException();
}
@Override
public boolean isSystemType(String typeName) {
return false;
}
});
return marsh;
}
Aggregations