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

io.ray.serve.poll.LongPollClient Maven / Gradle / Ivy

There is a newer version: 2.39.0
Show newest version
package io.ray.serve.poll;

import com.google.common.base.Preconditions;
import io.ray.api.BaseActorHandle;
import java.util.Map;

/** The asynchronous long polling client. */
public class LongPollClient {

  private Map keyListeners;

  private boolean running;

  public LongPollClient(BaseActorHandle hostActor, Map keyListeners) {
    Preconditions.checkArgument(keyListeners != null && keyListeners.size() != 0);
    LongPollClientFactory.register(hostActor, keyListeners);
    this.keyListeners = keyListeners;
    this.running = true;
  }

  public Map getKeyListeners() {
    return keyListeners;
  }

  public boolean isRunning() {
    return running;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy