本文整理了Java中software.amazon.awssdk.utils.IoUtils.closeIfCloseable()
方法的一些代码示例,展示了IoUtils.closeIfCloseable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IoUtils.closeIfCloseable()
方法的具体详情如下:
包路径:software.amazon.awssdk.utils.IoUtils
类名称:IoUtils
方法名:closeIfCloseable
[英]Closes the given Closeable quietly.
[中]安静地关闭给定的可关闭对象。
代码示例来源:origin: aws/aws-sdk-java-v2
@Override
public void close() {
// The delegate credentials provider may be closeable (eg. if it's an STS credentials provider). In this case, we should
// clean it up when this credentials provider is closed.
IoUtils.closeIfCloseable(credentialsProvider, null);
}
代码示例来源:origin: software.amazon.awssdk/auth
@Override
public void close() {
// The delegate credentials provider may be closeable (eg. if it's an STS credentials provider). In this case, we should
// clean it up when this credentials provider is closed.
IoUtils.closeIfCloseable(credentialsProvider, null);
}
代码示例来源:origin: aws/aws-sdk-java-v2
@Override
public void close() {
credentialsProviders.forEach(c -> IoUtils.closeIfCloseable(c, null));
}
代码示例来源:origin: software.amazon.awssdk/auth
@Override
public void close() {
credentialsProviders.forEach(c -> IoUtils.closeIfCloseable(c, null));
}
代码示例来源:origin: aws/aws-sdk-java-v2
@Override
public void close() {
attributes.values().forEach(v -> IoUtils.closeIfCloseable(v, null));
attributes.values().forEach(this::shutdownIfExecutorService);
}
代码示例来源:origin: software.amazon.awssdk/utils
@Override
public void close() {
attributes.values().forEach(v -> IoUtils.closeIfCloseable(v, null));
attributes.values().forEach(this::shutdownIfExecutorService);
}
代码示例来源:origin: aws/aws-sdk-java-v2
@Override
public void close() {
IoUtils.closeIfCloseable(parentCredentialsProvider, null);
IoUtils.closeQuietly(credentialsProvider, null);
IoUtils.closeQuietly(stsClient, null);
}
}
代码示例来源:origin: software.amazon.awssdk/sts
@Override
public void close() {
IoUtils.closeIfCloseable(parentCredentialsProvider, null);
IoUtils.closeQuietly(credentialsProvider, null);
IoUtils.closeQuietly(stsClient, null);
}
}
内容来源于网络,如有侵权,请联系作者删除!