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

com.linkedin.parseq.zk.recipes.Synchronizable Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
package com.linkedin.parseq.zk.recipes;

import com.linkedin.parseq.Task;


/**
 * Synchronizable represents a object upon which {@link Task}s within different plans
 * can be properly synchronized.
 *
 * @author Ang Xu
 */
public interface Synchronizable {
  /**
   * Runs the given task while holding this synchronizable.
   *
   * @param task task to run
   * @param deadline the absolute time, in milliseconds, to wait for the synchronizable.
   *
   * @return a new task wrapped with {@link ZKLock#synchronize(Task, long)}
   */
   Task synchronize(Task task, long deadline);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy