当前位置: 首页>>代码示例>>Java>>正文


Java Memoized类代码示例

本文整理汇总了Java中com.google.auto.value.extension.memoized.Memoized的典型用法代码示例。如果您正苦于以下问题:Java Memoized类的具体用法?Java Memoized怎么用?Java Memoized使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Memoized类属于com.google.auto.value.extension.memoized包,在下文中一共展示了Memoized类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: jsc

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized
JavaStreamingContext jsc() {
  SparkConf conf = new SparkConf(true)
      .setMaster(master())
      .setAppName(getClass().getName());
  if (!jars().isEmpty()) conf.setJars(jars().toArray(new String[0]));
  for (Map.Entry<String, String> entry : conf().entrySet()) {
    conf.set(entry.getKey(), entry.getValue());
  }
  return new JavaStreamingContext(conf, new Duration(batchDuration()));
}
 
开发者ID:openzipkin,项目名称:zipkin-sparkstreaming,代码行数:12,代码来源:SparkStreamingJob.java

示例2: getterName

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized
String getterName() {
	return getterName(rawPropertyName(),
			useIsForGetter()
			&& (typeName().isPrimitive() || typeName().isBoxedPrimitive())
			&& (typeName().unbox() == TypeName.BOOLEAN));
}
 
开发者ID:FermioCloud,项目名称:java-code-templates,代码行数:8,代码来源:BeanProperty.java

示例3: propertyName

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized
String propertyName() {
	final String prop = rawPropertyName();
	if (JAVA_KEYWORDS.contains(prop)) {
		return prop + "$";
	}
	return prop;
}
 
开发者ID:FermioCloud,项目名称:java-code-templates,代码行数:9,代码来源:BeanProperty.java

示例4: helperMethod

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Descriptor.CopyToOutput
@Memoized
default int helperMethod() {
	if (getName() == "bad name") {
		throw new RuntimeException();
	}

	return 42;
}
 
开发者ID:FermioCloud,项目名称:java-code-templates,代码行数:10,代码来源:AllTypesAndOneCopyDescriptor.java

示例5: get

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized AmazonKinesisAsync get() {
  AmazonKinesisAsyncClientBuilder builder = AmazonKinesisAsyncClientBuilder.standard();
  if (credentialsProvider() != null) {
    builder.withCredentials(credentialsProvider());
  }
  if (endpointConfiguration() != null) {
    builder.withEndpointConfiguration(endpointConfiguration());
  }
  if (region() != null) {
    builder.withRegion(region());
  }
  AmazonKinesisAsync result = builder.build();
  provisioned = true;
  return result;
}
 
开发者ID:openzipkin,项目名称:zipkin-aws,代码行数:16,代码来源:KinesisSender.java

示例6: get

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized AmazonSQSAsync get() {
  AmazonSQSAsync result = AmazonSQSAsyncClientBuilder.standard()
      .withCredentials(credentialsProvider())
      .withEndpointConfiguration(endpointConfiguration()).build();
  provisioned = true;
  return result;
}
 
开发者ID:openzipkin,项目名称:zipkin-aws,代码行数:8,代码来源:SQSSender.java

示例7: socket

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized DatagramSocket socket() {
  DatagramSocket result;
  try {
    result = new DatagramSocket();
  } catch (SocketException e) {
    throw new IllegalStateException(e);
  }
  provisioned = true;
  return result;
}
 
开发者ID:openzipkin,项目名称:zipkin-aws,代码行数:11,代码来源:XRayUDPStorage.java

示例8: get

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized Connection get() {
  Connection result;
  try {
    result = connectionFactory().newConnection(addresses());
  } catch (IOException | TimeoutException e) {
    throw new IllegalStateException("Unable to establish connection to RabbitMQ server", e);
  }
  provisioned = true;
  return result;
}
 
开发者ID:openzipkin,项目名称:zipkin-reporter-java,代码行数:11,代码来源:RabbitMQSender.java

示例9: type

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized
public Type type() {
  int dotIndex = identifier().indexOf('.');
  if (dotIndex == 0) {
    checkArgument(BaseUtils.isIdentifierWithLeadingDot(identifier()));
    return Type.DOT_IDENT;
  } else {
    checkArgument(BaseUtils.isDottedIdentifier(identifier()));
    return dotIndex == -1 ? Type.SINGLE_IDENT : Type.DOTTED_IDENT;
  }
}
 
开发者ID:google,项目名称:closure-templates,代码行数:12,代码来源:Identifier.java

示例10: getFingerprint

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized
byte[] getFingerprint() {
  Fingerprint fp = new Fingerprint();
  fp.addPath(getRoot().asRootedPath().asPath());
  fp.addBoolean(isPackage());
  fp.addBoolean(isFollowingSymlinks());
  fp.addBoolean(isRecursive());
  fp.addBoolean(isGenerated());
  getPackageBoundaryMode().fingerprint(fp);
  return fp.digestAndReset();
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:12,代码来源:FilesetTraversalParams.java

示例11: getFingerprint

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized
byte[] getFingerprint() {
  Fingerprint fp = new Fingerprint();
  fp.addPath(getDestPath());
  if (!getExcludedFiles().isEmpty()) {
    fp.addStrings(getExcludedFiles());
  }
  fp.addBytes(getDirectTraversal().get().getFingerprint());
  return fp.digestAndReset();
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:11,代码来源:FilesetTraversalParamsFactory.java

示例12: parts

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Memoized
public ImmutableList<String> parts() {
  return ImmutableList.copyOf(DOT_SPLITTER.split(value()));
}
 
开发者ID:bazelbuild,项目名称:BUILD_file_generator,代码行数:5,代码来源:ReferencedClassesParser.java

示例13: canProceed

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Override
@Memoized
public boolean canProceed() {
  return availableChoices().findAny().isPresent();
}
 
开发者ID:sudhirj,项目名称:switchboard,代码行数:6,代码来源:ImmutableBoard.java

示例14: score

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Override
@Memoized
public double score() {
  return choice() == null ? 0 : choice().score() + parentBoard().score();
}
 
开发者ID:sudhirj,项目名称:switchboard,代码行数:6,代码来源:ImmutableBoard.java

示例15: workDone

import com.google.auto.value.extension.memoized.Memoized; //导入依赖的package包/类
@Override
@Memoized
public long workDone() {
  return parentBoard() == null ? 0 : parentBoard().workDone() + 1;
}
 
开发者ID:sudhirj,项目名称:switchboard,代码行数:6,代码来源:ImmutableBoard.java


注:本文中的com.google.auto.value.extension.memoized.Memoized类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。