本文整理了Java中com.amazonaws.Request.getOriginalRequestObject
方法的一些代码示例,展示了Request.getOriginalRequestObject
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getOriginalRequestObject
方法的具体详情如下:
包路径:com.amazonaws.Request
类名称:Request
方法名:getOriginalRequestObject
暂无
代码示例来源:origin: aws/aws-sdk-java
/**
* Returned the best-guessed throughput metric type for the given request,
* or null if there is none or if metric is disabled.
*/
public static ThroughputMetricType guessThroughputMetricType(
final Request<?> req,
final String metricNameSuffix,
final String byteCountMetricNameSuffix)
{
if (!AwsSdkMetrics.isMetricsEnabled())
return null; // metric disabled
Object orig = req.getOriginalRequestObject();
if (orig.getClass().getName().startsWith("com.amazonaws.services.s3")) {
return new SimpleThroughputMetricType(
"S3" + metricNameSuffix,
req.getServiceName(),
"S3" + byteCountMetricNameSuffix);
}
return null;
}
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-core
/**
* Returned the best-guessed throughput metric type for the given request,
* or null if there is none or if metric is disabled.
*/
public static ThroughputMetricType guessThroughputMetricType(
final Request<?> req,
final String metricNameSuffix,
final String byteCountMetricNameSuffix)
{
if (!AwsSdkMetrics.isMetricsEnabled())
return null; // metric disabled
Object orig = req.getOriginalRequestObject();
if (orig.getClass().getName().startsWith("com.amazonaws.services.s3")) {
return new SimpleThroughputMetricType(
"S3" + metricNameSuffix,
req.getServiceName(),
"S3" + byteCountMetricNameSuffix);
}
return null;
}
}
代码示例来源:origin: Nextdoor/bender
/**
* Returned the best-guessed throughput metric type for the given request,
* or null if there is none or if metric is disabled.
*/
public static ThroughputMetricType guessThroughputMetricType(
final Request<?> req,
final String metricNameSuffix,
final String byteCountMetricNameSuffix)
{
if (!AwsSdkMetrics.isMetricsEnabled())
return null; // metric disabled
Object orig = req.getOriginalRequestObject();
if (orig.getClass().getName().startsWith("com.amazonaws.services.s3")) {
return new SimpleThroughputMetricType(
"S3" + metricNameSuffix,
req.getServiceName(),
"S3" + byteCountMetricNameSuffix);
}
return null;
}
}
内容来源于网络,如有侵权,请联系作者删除!