@Override public final void release() { // Don't call IOUtils.release(in, null) or else could lead to infinite loop SdkIOUtils.closeQuietly(this); if (in instanceof Releasable) { // This allows any underlying stream that has the close operation // disabled to be truly released Releasable r = (Releasable)in; r.release(); } } }
public void setMetrics(AWSRequestMetrics metrics) throws IOException { // make sure metricsIS is initialized. getInputStream(); metricsIS.setMetrics(metrics); }
@Override public final boolean isMetricActivated() { InputStream in = getWrappedInputStream(); if (in instanceof MetricAware) { MetricAware metricAware = (MetricAware)in; return metricAware.isMetricActivated(); } return false; }
/** * @return */ public java.util.List<VolumeInfo> getVolumeInfos() { if (volumeInfos == null) { volumeInfos = new com.amazonaws.internal.SdkInternalList<VolumeInfo>(); } return volumeInfos; }
/** * <p> * Environment variable key-value pairs. * </p> * * @param variables * Environment variable key-value pairs. */ public void setVariables(java.util.Map<String, String> variables) { this.variables = variables == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>(variables); }
/** * Wraps the given input stream into a {@link ReleasableInputStream} if * necessary. Note if the given input stream is a {@link FileInputStream}, a * {@link ResettableInputStream} which is a specific subclass of * {@link ReleasableInputStream} will be returned. */ public static ReleasableInputStream wrap(InputStream is) { if (is instanceof ReleasableInputStream) return (ReleasableInputStream)is; // already wrapped if (is instanceof FileInputStream) return ResettableInputStream.newResettableInputStream((FileInputStream)is); return new ReleasableInputStream(is); } }
/** * @param volumeInfos */ public void setVolumeInfos(java.util.Collection<VolumeInfo> volumeInfos) { if (volumeInfos == null) { this.volumeInfos = null; return; } this.volumeInfos = new com.amazonaws.internal.SdkInternalList<VolumeInfo>(volumeInfos); }
/** * <p> * The schedule for Thursday. * </p> * * @param thursday * The schedule for Thursday. */ public void setThursday(java.util.Map<String, String> thursday) { this.thursday = thursday == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>(thursday); }
@Override public void release() { // Don't call IOUtils.release(in, null) or else could lead to infinite loop SdkIOUtils.closeQuietly(this); if (in instanceof Releasable) { // This allows any underlying stream that has the close operation // disabled to be truly released Releasable r = (Releasable)in; r.release(); } } }
/** * @return */ public java.util.List<Artifact> getArtifactList() { if (artifactList == null) { artifactList = new com.amazonaws.internal.SdkInternalList<Artifact>(); } return artifactList; }
/** * <p> * The schedule for Friday. * </p> * * @param friday * The schedule for Friday. */ public void setFriday(java.util.Map<String, String> friday) { this.friday = friday == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>(friday); }
/** * @param artifactList */ public void setArtifactList(java.util.Collection<Artifact> artifactList) { if (artifactList == null) { this.artifactList = null; return; } this.artifactList = new com.amazonaws.internal.SdkInternalList<Artifact>(artifactList); }
/** * <p> * The schedule for Sunday. * </p> * * @param sunday * The schedule for Sunday. */ public void setSunday(java.util.Map<String, String> sunday) { this.sunday = sunday == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>(sunday); }
/** * @return */ public java.util.List<Tag> getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList<Tag>(); } return tags; }
/** * <p> * The list of all tags added to the specified queue. * </p> * * @param tags * The list of all tags added to the specified queue. */ public void setTags(java.util.Map<String, String> tags) { this.tags = tags == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>(tags); }
/** * @param tags */ public void setTags(java.util.Collection<Tag> tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags); }
/** * @return */ public java.util.List<Tag> getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList<Tag>(); } return tags; }
/** * @param commandPlugins */ public void setCommandPlugins(java.util.Collection<CommandPlugin> commandPlugins) { if (commandPlugins == null) { this.commandPlugins = null; return; } this.commandPlugins = new com.amazonaws.internal.SdkInternalList<CommandPlugin>(commandPlugins); }
/** * @return */ public java.util.List<Tag> getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList<Tag>(); } return tags; }
/** * @return */ public java.util.List<Tag> getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList<Tag>(); } return tags; }