org.jclouds.byon.config.YamlNodeStoreModule.bind()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中org.jclouds.byon.config.YamlNodeStoreModule.bind()方法的一些代码示例,展示了YamlNodeStoreModule.bind()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlNodeStoreModule.bind()方法的具体详情如下:
包路径:org.jclouds.byon.config.YamlNodeStoreModule
类名称:YamlNodeStoreModule
方法名:bind

YamlNodeStoreModule.bind介绍

暂无

代码示例

代码示例来源:origin: org.apache.jclouds.api/byon

@Override
protected void configure() {
 bind(new TypeLiteral<Supplier<LoadingCache<String, Node>>>() {
 }).to(NodesParsedFromSupplier.class);
 bind(new TypeLiteral<Function<ByteSource, LoadingCache<String, Node>>>() {
 }).to(NodesFromYamlStream.class);
 bind(new TypeLiteral<Function<YamlNode, ByteSource>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.yamlNodeToByteSource);
 bind(new TypeLiteral<Function<ByteSource, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.byteSourceToYamlNode);
 bind(new TypeLiteral<Function<Node, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.nodeToYamlNode);
 bind(new TypeLiteral<Function<YamlNode, Node>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.toNode);
 if (backing != null) {
   bind(new TypeLiteral<Map<String, ByteSource>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(backing);
 } else {
   bind(new TypeLiteral<Map<String, ByteSource>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(BACKING);
 }
}

代码示例来源:origin: jclouds/legacy-jclouds

@Override
protected void configure() {
 bind(new TypeLiteral<Supplier<LoadingCache<String, Node>>>() {
 }).to(NodesParsedFromSupplier.class);
 bind(new TypeLiteral<Function<InputStream, LoadingCache<String, Node>>>() {
 }).to(NodesFromYamlStream.class);
 bind(new TypeLiteral<Function<YamlNode, InputStream>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.yamlNodeToInputStream);
 bind(new TypeLiteral<Function<InputStream, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.inputStreamToYamlNode);
 bind(new TypeLiteral<Function<Node, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.nodeToYamlNode);
 bind(new TypeLiteral<Function<YamlNode, Node>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.toNode);
 if (backing != null) {
   bind(new TypeLiteral<Map<String, InputStream>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(backing);
 } else {
   bind(new TypeLiteral<Map<String, InputSupplier<InputStream>>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(BACKING);
   bind(new TypeLiteral<Map<String, InputStream>>() {
   }).annotatedWith(Names.named("yaml")).to(new TypeLiteral<YAMLCopyInputStreamInputSupplierMap>() {
   });
 }
}

代码示例来源:origin: apache/jclouds

@Override
protected void configure() {
 bind(new TypeLiteral<Supplier<LoadingCache<String, Node>>>() {
 }).to(NodesParsedFromSupplier.class);
 bind(new TypeLiteral<Function<ByteSource, LoadingCache<String, Node>>>() {
 }).to(NodesFromYamlStream.class);
 bind(new TypeLiteral<Function<YamlNode, ByteSource>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.yamlNodeToByteSource);
 bind(new TypeLiteral<Function<ByteSource, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.byteSourceToYamlNode);
 bind(new TypeLiteral<Function<Node, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.nodeToYamlNode);
 bind(new TypeLiteral<Function<YamlNode, Node>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.toNode);
 if (backing != null) {
   bind(new TypeLiteral<Map<String, ByteSource>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(backing);
 } else {
   bind(new TypeLiteral<Map<String, ByteSource>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(BACKING);
 }
}

代码示例来源:origin: org.jclouds.api/byon

@Override
protected void configure() {
 bind(new TypeLiteral<Supplier<LoadingCache<String, Node>>>() {
 }).to(NodesParsedFromSupplier.class);
 bind(new TypeLiteral<Function<InputStream, LoadingCache<String, Node>>>() {
 }).to(NodesFromYamlStream.class);
 bind(new TypeLiteral<Function<YamlNode, InputStream>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.yamlNodeToInputStream);
 bind(new TypeLiteral<Function<InputStream, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.inputStreamToYamlNode);
 bind(new TypeLiteral<Function<Node, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.nodeToYamlNode);
 bind(new TypeLiteral<Function<YamlNode, Node>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.toNode);
 if (backing != null) {
   bind(new TypeLiteral<Map<String, InputStream>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(backing);
 } else {
   bind(new TypeLiteral<Map<String, InputSupplier<InputStream>>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(BACKING);
   bind(new TypeLiteral<Map<String, InputStream>>() {
   }).annotatedWith(Names.named("yaml")).to(new TypeLiteral<YAMLCopyInputStreamInputSupplierMap>() {
   });
 }
}

代码示例来源:origin: io.cloudsoft.jclouds.api/byon

@Override
protected void configure() {
 bind(new TypeLiteral<Supplier<LoadingCache<String, Node>>>() {
 }).to(NodesParsedFromSupplier.class);
 bind(new TypeLiteral<Function<InputStream, LoadingCache<String, Node>>>() {
 }).to(NodesFromYamlStream.class);
 bind(new TypeLiteral<Function<YamlNode, InputStream>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.yamlNodeToInputStream);
 bind(new TypeLiteral<Function<InputStream, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.inputStreamToYamlNode);
 bind(new TypeLiteral<Function<Node, YamlNode>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.nodeToYamlNode);
 bind(new TypeLiteral<Function<YamlNode, Node>>() {
 }).toInstance(org.jclouds.byon.domain.YamlNode.toNode);
 if (backing != null) {
   bind(new TypeLiteral<Map<String, InputStream>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(backing);
 } else {
   bind(new TypeLiteral<Map<String, InputSupplier<InputStream>>>() {
   }).annotatedWith(Names.named("yaml")).toInstance(BACKING);
   bind(new TypeLiteral<Map<String, InputStream>>() {
   }).annotatedWith(Names.named("yaml")).to(new TypeLiteral<YAMLCopyInputStreamInputSupplierMap>() {
   });
 }
}

相关文章

YamlNodeStoreModule类方法