Example usage for io.netty.util ReferenceCountUtil touch

List of usage examples for io.netty.util ReferenceCountUtil touch

Introduction

In this page you can find the example usage for io.netty.util ReferenceCountUtil touch.

Prototype

@SuppressWarnings("unchecked")
public static <T> T touch(T msg) 

Source Link

Document

Tries to call ReferenceCounted#touch() if the specified message implements ReferenceCounted .

Usage

From source file:com.linecorp.armeria.common.stream.AbstractStreamMessage.java

License:Apache License

T prepareObjectForNotification(SubscriptionImpl subscription, T o) {
    ReferenceCountUtil.touch(o);
    onRemoval(o);//from   w  w w.  j ava  2s  .  c o  m
    if (!subscription.withPooledObjects()) {
        o = PooledObjects.toUnpooled(o);
    }
    return o;
}