Tabnine Logo
AcknowledgeSubscriptionMessagesProcessor.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.oracle.coherence.patterns.messaging.entryprocessors.AcknowledgeSubscriptionMessagesProcessor
constructor

Best Java code snippets using com.oracle.coherence.patterns.messaging.entryprocessors.AcknowledgeSubscriptionMessagesProcessor.<init> (Showing top 5 results out of 315)

origin: com.oracle.coherence.incubator/coherence-eventdistributionpattern

  /**
   * {@inheritDoc}
   */
  @Override
  protected void acknowledgeDistributedEvents(List<Event>    events,
                        MessageTracker messageTracker)
  {
    // create the set of keys for messages to acknowledge
    ArrayList<MessageKey>       messageKeys = new ArrayList<MessageKey>(events.size());
    Iterator<MessageIdentifier> messageIds  = messageTracker.iterator();

    while (messageIds.hasNext())
    {
      MessageIdentifier messageId = messageIds.next();

      messageKeys.add(Message.getKey(subscriptionIdentifier.getDestinationIdentifier(), messageId));
    }

    // remove this subscriber from each of the messages in this batch
    // (to help clean up the messages when they are completely consumed)
    NamedCache messagesCache = CacheFactory.getCache(Message.CACHENAME);

    messagesCache.invokeAll(messageKeys, new AcknowledgeMessageProcessor(subscriptionIdentifier));

    // remove the range we've just distributed from the subscriber
    NamedCache subscriptions = CacheFactory.getCache(Subscription.CACHENAME);

    subscriptions.invoke(subscriptionIdentifier, new AcknowledgeSubscriptionMessagesProcessor(messageTracker));
  }
}
origin: com.oracle.coherence.incubator/coherence-messagingpattern

/**
 * {@inheritDoc}
 */
public void commit()
{
  ensureActive();
  if (!isAutoCommitting())
  {
    // ensure that we have a subscription from which we can retrieve
    // messages
    ensureSubscription();
    // determine the range of messages that are visible
    // (these are the ones we must acknowledge)
    MessageTracker messageTracker =
      (MessageTracker) CacheFactory.getCache(Subscription.CACHENAME).invoke(getSubscriptionIdentifier(),
                                         new ExtractorProcessor("getVisibleMessageTracker"));
    // send the AcknowledgeMessageProcessor to all of the visible
    // messages
    ArrayList<MessageKey> messageKeys = messageTracker.getMessageKeys(getDestinationIdentifier());
    CacheFactory.getCache(Message.CACHENAME).invokeAll(messageKeys,
                              new AcknowledgeMessageProcessor(getSubscriptionIdentifier()));
    // let the subscriber know that we've acknowledged all messages
    CacheFactory.getCache(Subscription.CACHENAME).invoke(getSubscriptionIdentifier(),
                               new AcknowledgeSubscriptionMessagesProcessor(messageTracker));
  }
}
origin: com.oracle.coherence.incubator/coherence-messagingpattern

/**
 * {@inheritDoc}
 */
public void commit()
{
  ensureActive();
  if (!isAutoCommitting())
  {
    // ensure that we have a subscription from which we can retrieve
    // messages
    ensureSubscription();
    // determine the range of messages that have been delivered
    // (these are the ones we must acknowledge)
    MessageTracker messageTracker =
      (MessageTracker) CacheFactory.getCache(Subscription.CACHENAME).invoke(getSubscriptionIdentifier(),
                                         new ExtractorProcessor("getDeliveredMessageTracker"));
    if (!messageTracker.isEmpty())
    {
      // Tell Message that is has been acked
      ArrayList<MessageKey> messageKeys = messageTracker.getMessageKeys(getDestinationIdentifier());
      CacheFactory.getCache(Message.CACHENAME).invokeAll(messageKeys,
                                new AcknowledgeMessageProcessor(getSubscriptionIdentifier()));
      // Tell subscription that msg has been acked.
      CacheFactory.getCache(Subscription.CACHENAME).invoke(getSubscriptionIdentifier(),
                                 new AcknowledgeSubscriptionMessagesProcessor(messageTracker));
    }
  }
}
origin: com.oracle.coherence.incubator/coherence-messagingpattern

new AcknowledgeSubscriptionMessagesProcessor(messageTracker));
origin: com.oracle.coherence.incubator/coherence-messagingpattern

new AcknowledgeSubscriptionMessagesProcessor(messageTracker));
com.oracle.coherence.patterns.messaging.entryprocessorsAcknowledgeSubscriptionMessagesProcessor<init>

Javadoc

Required for ExternalizableLite and PortableObject.

Popular methods of AcknowledgeSubscriptionMessagesProcessor

    Popular in Java

    • Running tasks concurrently on multiple threads
    • getExternalFilesDir (Context)
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • findViewById (Activity)
    • BufferedInputStream (java.io)
      A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
    • FileInputStream (java.io)
      An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
    • Date (java.util)
      A specific moment in time, with millisecond precision. Values typically come from System#currentTime
    • List (java.util)
      An ordered collection (also known as a sequence). The user of this interface has precise control ove
    • ThreadPoolExecutor (java.util.concurrent)
      An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
    • Response (javax.ws.rs.core)
      Defines the contract between a returned instance and the runtime when an application needs to provid
    • Top Sublime Text 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