Example usage for io.netty.util ReferenceCounted retain

List of usage examples for io.netty.util ReferenceCounted retain

Introduction

In this page you can find the example usage for io.netty.util ReferenceCounted retain.

Prototype

ReferenceCounted retain(int increment);

Source Link

Document

Increases the reference count by the specified increment .

Usage

From source file:org.lanternpowered.server.network.message.ReferenceCountedMessage.java

License:MIT License

@Override
public ReferenceCounted retain(int increment) {
    final ReferenceCounted referenceCounted = getReferenceCounted();
    if (referenceCounted != null) {
        referenceCounted.retain(increment);
    }/*from  www  . ja v  a  2  s  . c  o m*/
    return this;
}