org.jclouds.io.Payload.release()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(179)

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

Payload.release介绍

[英]release resources used by this entity. This should be called when data is discarded.
[中]释放此实体使用的资源。当数据被丢弃时,应该调用该函数。

代码示例

代码示例来源:origin: rackerlabs/blueflood

tempFile.delete();
} finally {
  payload.release();
  downloadContext.stop();

代码示例来源:origin: org.jclouds/jclouds-core

@Override
public void release() {
 delegate.release();
}

代码示例来源:origin: com.amysta.jclouds/jclouds-core

@Override
public void release() {
 delegate.release();
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

@Override
public void release() {
 delegate.release();
}

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

@Override
public void release() {
 this.payload.release();
}

代码示例来源:origin: Nextdoor/bender

@Override
public void release() {
 delegate.release();
}

代码示例来源:origin: com.amysta.jclouds/jclouds-core

/**
* {@inheritDoc}
*/
@Override
public void setPayload(Payload data) {
 if (this.payload != null)
   payload.release();
 this.payload = checkNotNull(data, "data");
}

代码示例来源:origin: org.jclouds/jclouds-core

/**
* {@inheritDoc}
*/
@Override
public void setPayload(Payload data) {
 if (this.payload != null)
   payload.release();
 this.payload = checkNotNull(data, "data");
}

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

/**
* {@inheritDoc}
*/
@Override
public void setPayload(Payload data) {
 if (this.payload != null)
   payload.release();
 this.payload = checkNotNull(data, "data");
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

/**
* {@inheritDoc}
*/
@Override
public void setPayload(Payload data) {
 if (this.payload != null)
   payload.release();
 this.payload = checkNotNull(data, "data");
}

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

public void handleError(HttpCommand command, HttpResponse response) {
  if (response.getPayload() != null)
   response.getPayload().release();
}

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

public static void releasePayload(HttpMessage from) {
 if (from.getPayload() != null)
   from.getPayload().release();
}

代码示例来源:origin: org.jclouds/jclouds-core

public void handleError(HttpCommand command, HttpResponse response) {
  if (response.getPayload() != null)
   response.getPayload().release();
}

代码示例来源:origin: com.amysta.jclouds/jclouds-core

public static void releasePayload(HttpMessage from) {
 if (from.getPayload() != null)
   from.getPayload().release();
}

代码示例来源:origin: com.amysta.jclouds/jclouds-core

public void handleError(HttpCommand command, HttpResponse response) {
  if (response.getPayload() != null)
   response.getPayload().release();
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

public static void releasePayload(HttpMessage from) {
 if (from.getPayload() != null)
   from.getPayload().release();
}

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

@Test(invocationCount = 5, timeOut = 5000)
public void testPostContentDisposition() {
 Payload payload = newStringPayload("foo");
 payload.getContentMetadata().setContentDisposition("attachment; filename=photo.jpg");
 Multimap<String, String> headers = client.postPayloadAndReturnHeaders("", payload);
 assertEquals(headers.get("x-Content-Disposition"), ImmutableList.of("attachment; filename=photo.jpg"));
 payload.release();
}

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

@Test(invocationCount = 5, timeOut = 5000)
public void testPostContentLanguage() {
 Payload payload = newStringPayload("foo");
 payload.getContentMetadata().setContentLanguage("mi, en");
 Multimap<String, String> headers = client.postPayloadAndReturnHeaders("", payload);
 assertEquals(headers.get("x-Content-Language"), ImmutableList.of("mi, en"));
 payload.release();
}

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

@Override
public void cleanup(HttpRequest nativeResponse) {
  if (nativeResponse != null && nativeResponse.getPayload() != null)
   nativeResponse.getPayload().release();
}

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

@Test(invocationCount = 5, timeOut = 5000)
public void testPostContentEncoding() {
 Payload payload = newStringPayload("foo");
 payload.getContentMetadata().setContentEncoding("gzip");
 Multimap<String, String> headers = client.postPayloadAndReturnHeaders("", payload);
 assertEquals(headers.get("x-Content-Encoding"), ImmutableList.of("gzip"));
 payload.release();
}

相关文章