Codota Logo
io.zeebe.dispatcher
Code IndexAdd Codota to your IDE (free)

How to use io.zeebe.dispatcher

Best Java code snippets using io.zeebe.dispatcher (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: zeebe-io/zeebe

@Override
public Iterator<DirectBuffer> iterator() {
 iterator.reset();
 return iterator;
}
origin: zeebe-io/zeebe

/**
 * Claim a fragment of the buffer with the given length. Use {@link ClaimedFragment#getBuffer()}
 * to write the message and finish the operation using {@link ClaimedFragment#commit()} or {@link
 * ClaimedFragment#abort()}. Note that the claim operation can fail if the publisher limit or the
 * buffer partition size is reached.
 *
 * @return the new publisher position if the fragment was claimed successfully. Otherwise, the
 *     return value is negative.
 */
public long claim(ClaimedFragment claim, int length) {
 return claim(claim, length, 0);
}
origin: zeebe-io/zeebe

protected void openDefaultSubscriptions() {
 final int subscriptionSize =
   defaultSubscriptionNames == null ? 0 : defaultSubscriptionNames.length;
 for (int i = 0; i < subscriptionSize; i++) {
  doOpenSubscription(defaultSubscriptionNames[i], dataConsumed);
 }
}
origin: zeebe-io/zeebe

/**
 * Writes the given part of the message to the buffer. This can fail if the publisher limit or the
 * buffer partition size is reached.
 *
 * @return the new publisher position if the message was written successfully. Otherwise, the
 *     return value is negative.
 */
public long offer(DirectBuffer msg, int start, int length) {
 return offer(msg, start, length, 0);
}
origin: zeebe-io/zeebe

 @Override
 public int poll(int maxCount) {
  return subscription.poll(fragmentHandler, maxCount);
 }
}
origin: zeebe-io/zeebe

 public long getCurrentAppenderPosition() {
  return writeBufferSubscription.getPosition();
 }
}
origin: zeebe-io/zeebe

public long getPublisherLimit() {
 if (isClosed) {
  return -1L;
 } else {
  return publisherLimit.get();
 }
}
origin: zeebe-io/zeebe

 @Override
 public void removeConsumer(ActorCondition listener) {
  subscription.removeConsumer(listener);
 }
}
origin: zeebe-io/zeebe

@Override
public boolean hasAvailable() {
 return subscription.hasAvailable();
}
origin: zeebe-io/zeebe

/** Finish reading and consume the fragments (i.e. update the subscription position). */
public void markCompleted() {
 updatePosition();
}
origin: zeebe-io/zeebe

private long claimBatchForEvents() {
 final int batchLength = eventLength + (eventCount * HEADER_BLOCK_LENGTH);
 long claimedPosition = -1;
 do {
  claimedPosition = logWriteBuffer.claim(claimedBatch, eventCount, batchLength);
 } while (claimedPosition == RESULT_PADDING_AT_END_OF_PARTITION);
 return claimedPosition;
}
origin: io.zeebe/zb-dispatcher

/**
 * Writes the given part of the message to the buffer. This can fail if the publisher limit or the
 * buffer partition size is reached.
 *
 * @return the new publisher position if the message was written successfully. Otherwise, the
 *     return value is negative.
 */
public long offer(DirectBuffer msg, int start, int length) {
 return offer(msg, start, length, 0);
}
origin: io.zeebe/zb-transport

 @Override
 public int poll(int maxCount) {
  return subscription.poll(fragmentHandler, maxCount);
 }
}
origin: io.zeebe/zb-dispatcher

public long getPublisherLimit() {
 if (isClosed) {
  return -1L;
 } else {
  return publisherLimit.get();
 }
}
origin: io.zeebe/zb-dispatcher

@Override
public Iterator<DirectBuffer> iterator() {
 iterator.reset();
 return iterator;
}
origin: io.zeebe/zb-dispatcher

protected void openDefaultSubscriptions() {
 final int subscriptionSize =
   defaultSubscriptionNames == null ? 0 : defaultSubscriptionNames.length;
 for (int i = 0; i < subscriptionSize; i++) {
  doOpenSubscription(defaultSubscriptionNames[i], dataConsumed);
 }
}
origin: io.zeebe/zb-logstreams

private long claimBatchForEvents() {
 final int batchLength = eventLength + (eventCount * HEADER_BLOCK_LENGTH);
 long claimedPosition = -1;
 do {
  claimedPosition = logWriteBuffer.claim(claimedBatch, eventCount, batchLength);
 } while (claimedPosition == RESULT_PADDING_AT_END_OF_PARTITION);
 return claimedPosition;
}
origin: zeebe-io/zeebe

protected int onMessage(DirectBuffer buffer, int offset, int length, int streamId) {
 if (receiveBuffer == null) {
  return CONSUME_FRAGMENT_RESULT;
 }
 final long offerPosition = receiveBuffer.offer(buffer, offset, length, streamId);
 if (offerPosition < 0) {
  return POSTPONE_FRAGMENT_RESULT;
 } else {
  return CONSUME_FRAGMENT_RESULT;
 }
}
origin: zeebe-io/zeebe

public long getPublisherPosition() {
 if (isClosed) {
  return -1L;
 } else {
  return publisherPosition.get();
 }
}
origin: io.zeebe/zb-transport

protected int onMessage(DirectBuffer buffer, int offset, int length, int streamId) {
 if (receiveBuffer == null) {
  return CONSUME_FRAGMENT_RESULT;
 }
 final long offerPosition = receiveBuffer.offer(buffer, offset, length, streamId);
 if (offerPosition < 0) {
  return POSTPONE_FRAGMENT_RESULT;
 } else {
  return CONSUME_FRAGMENT_RESULT;
 }
}
io.zeebe.dispatcher

Most used classes

  • ClaimedFragment
    Represents a claimed fragment in the buffer.Reusable but not threadsafe.
  • Dispatcher
    Component for sending and receiving messages between different threads.
  • DispatcherBuilder
    Builder for a Dispatcher
  • Subscription
  • DataFrameDescriptor
    0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7
  • BlockPeek,
  • ClaimedFragmentBatch,
  • FragmentHandler,
  • PositionUtil,
  • AtomicPosition,
  • BlockPeek$DataFrameIterator,
  • LogBuffer,
  • LogBufferAppender,
  • LogBufferDescriptor,
  • LogBufferPartition,
  • PartitionBuilder
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now