本文整理了Java中com.vmware.xenon.common.Utils.toDocumentKind()
方法的一些代码示例,展示了Utils.toDocumentKind()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.toDocumentKind()
方法的具体详情如下:
包路径:com.vmware.xenon.common.Utils
类名称:Utils
方法名:toDocumentKind
暂无
代码示例来源:origin: vmware/xenon
/**
* Builds a kind string from a type. It uses a cache to lookup the type to kind
* mapping. The mapping can be overridden with {@code Utils#registerKind(Class, String)}
*/
public static String buildKind(Class<?> type) {
return KINDS.computeIfAbsent(type.getName(), name -> toDocumentKind(type));
}
代码示例来源:origin: com.vmware.photon.controller/photon-model
public static void registerCustomDeserializer() {
// Register types that are used with polymorphism
Utils.registerKind(ComputeState.class, Utils.toDocumentKind(ComputeState.class));
Utils.registerKind(NetworkInterfaceState.class,
Utils.toDocumentKind(NetworkInterfaceState.class));
// Register custom mapper to handle polymorphic fields
Utils.registerCustomJsonMapper(LoadBalancerStateExpanded.class, new JsonMapper((b) -> {
b.registerTypeAdapter(ResourceState.class, new ResourceStateDeserializer());
b.registerTypeAdapter(ComputeState.class, new DerivedResourceStateDeserializer());
b.registerTypeAdapter(NetworkInterfaceState.class,
new DerivedResourceStateDeserializer());
}));
}
}
代码示例来源:origin: com.vmware.xenon/xenon-common
Utils.toDocumentKind(ExampleServiceState.class));
代码示例来源:origin: vmware/xenon
Utils.toDocumentKind(ExampleServiceState.class));
代码示例来源:origin: vmware/xenon
@After
public void tearDown() throws InterruptedException {
this.expectFailure = false;
Utils.registerKind(ExampleServiceState.class,
Utils.toDocumentKind(ExampleServiceState.class));
LuceneDocumentIndexService
.setImplicitQueryResultLimit(LuceneDocumentIndexService.DEFAULT_QUERY_RESULT_LIMIT);
this.replicationFactor = 0;
TestXenonConfiguration.restore();
if (this.host == null) {
return;
}
if (this.host.isRemotePeerTest()) {
try {
this.host.logNodeProcessLogs(this.host.getNodeGroupMap().keySet(),
ServiceUriPaths.PROCESS_LOG);
} catch (Throwable e) {
this.host.log("Failure retrieving process logs: %s", Utils.toString(e));
}
try {
this.host.logNodeManagementState(this.host.getNodeGroupMap().keySet());
} catch (Throwable e) {
this.host.log("Failure retrieving management state: %s", Utils.toString(e));
}
}
this.host.tearDownInProcessPeers();
this.host.toggleNegativeTestMode(false);
this.host.tearDown();
this.host = null;
}
代码示例来源:origin: com.vmware.xenon/xenon-common
this.expectFailure = false;
Utils.registerKind(ExampleServiceState.class,
Utils.toDocumentKind(ExampleServiceState.class));
LuceneDocumentIndexService
.setImplicitQueryResultLimit(LuceneDocumentIndexService.DEFAULT_QUERY_RESULT_LIMIT);
内容来源于网络,如有侵权,请联系作者删除!