Example usage for io.netty.handler.codec.http FullHttpResponse retainedDuplicate

List of usage examples for io.netty.handler.codec.http FullHttpResponse retainedDuplicate

Introduction

In this page you can find the example usage for io.netty.handler.codec.http FullHttpResponse retainedDuplicate.

Prototype

@Override
    FullHttpResponse retainedDuplicate();

Source Link

Usage

From source file:no.nb.nna.broprox.harvester.proxy.AlreadyCrawledCache.java

License:Apache License

public FullHttpResponse get(String uri, String exIdHeader) {
    if (exIdHeader == null || BroproxHeaderConstants.MANUAL_EXID.equals(exIdHeader)) {
        return null;
    }/* w w w .ja v a2 s. c  o  m*/

    CacheKey key = new CacheKey(uri, exIdHeader);
    FullHttpResponse cacheValue = cache.peek(key);

    if (cacheValue != null) {
        return cacheValue.retainedDuplicate();
    } else {
        return null;
    }
}