Tabnine Logo
Flow
Code IndexAdd Tabnine to your IDE (free)

How to use
Flow
in
com.obsidiandynamics.flow

Best Java code snippets using com.obsidiandynamics.flow.Flow (Showing top 3 results out of 315)

origin: com.obsidiandynamics.blackstrom/blackstrom-core

@Override
public Confirmation begin(MessageContext context, Message message) {
 final Flow flow = flows.computeIfAbsent(message.getShard(), shard -> {
  final Flow newFlow = new Flow(firingStrategyFactory, Flow.class.getSimpleName() + "-shard-[" + shard + "]");
  synchronized (terminateLock) {
   createdFlows.add(newFlow);
   if (terminated) {
    // the container was already terminated -- terminate the newly created flow; the resulting Confirmation
    // objects won't do anything
    newFlow.terminate();
   }
  }
  return newFlow;
 });
 final MessageId messageId = message.getMessageId();
 return flow.begin(messageId, new ConfirmTask(context, messageId));
}
origin: com.obsidiandynamics.fulcrum/fulcrum-flow

 @Override
 public void cycle(WorkerThread thread) throws InterruptedException {
  if (current != null) {
   if (current.isAnchor()) {
    // skip the anchor
   } else if (current.isConfirmed()) {
    flow.removeWithoutCompleting(current.getId());
    complete = current;
   } else {
    if (complete != null) { 
     flow.complete(complete);
     complete = null;
    }
    
    Thread.sleep(CYCLE_IDLE_INTERVAL_MILLIS);
    return;
   }
  } else {
   Thread.sleep(CYCLE_IDLE_INTERVAL_MILLIS);
  }
  
  current = head.next();
  if (current != null) {
   head = current;
  } else if (complete != null) { 
   flow.complete(complete);
   complete = null;
  }
 }
}
origin: com.obsidiandynamics.fulcrum/fulcrum-flow

 @Override
 public void cycle(WorkerThread thread) throws InterruptedException {
  if (current != null) {
   if (current.isAnchor()) {
    // skip the anchor
   } else if (current.isConfirmed()) {
    flow.complete(current);
   } else {
    Thread.sleep(CYCLE_IDLE_INTERVAL_MILLIS);
    return;
   }
  } else {
   Thread.sleep(CYCLE_IDLE_INTERVAL_MILLIS);
  }
  
  current = head.next();
  if (current != null) {
   head = current;
  }
 }
}
com.obsidiandynamics.flowFlow

Most used methods

  • <init>
  • begin
  • complete
  • removeWithoutCompleting
  • terminate
    Terminates the flow, shutting down the worker thread and preventing further task executions.

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now