All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hprose.server.Topic Maven / Gradle / Ivy

/**********************************************************\
|                                                          |
|                          hprose                          |
|                                                          |
| Official WebSite: http://www.hprose.com/                 |
|                   http://www.hprose.org/                 |
|                                                          |
\**********************************************************/
/**********************************************************\
 *                                                        *
 * Topic.java                                             *
 *                                                        *
 * push topic class for Java.                             *
 *                                                        *
 * LastModified: Jul 3, 2016                              *
 * Author: Ma Bingyao                   *
 *                                                        *
\**********************************************************/

package hprose.server;

import hprose.util.concurrent.Promise;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicInteger;

class Topic {
    public volatile Future timer;
    public volatile Promise request;
    public final ConcurrentLinkedQueue messages = new ConcurrentLinkedQueue();
    public final AtomicInteger count = new AtomicInteger(1);
    public final int heartbeat;
    public Topic(int heartbeat) {
        this.heartbeat = heartbeat;
    }
}