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

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Path (java.nio.file)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • 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