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

How to use
Range
in
com.oracle.coherence.common.ranges

Best Java code snippets using com.oracle.coherence.common.ranges.Range (Showing top 6 results out of 315)

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

/**
 * Get the iterator for the next wrapper in the map.
 *
 * @return RangeWrapper
 */
private Iterator<Long> nextRangeIterator()
{
  if (rangeWrapperMapIterator.hasNext())
  {
    currentWrapper = this.rangeWrapperMapIterator.next();
    return currentWrapper.range.iterator();
  }
  else
  {
    return null;
  }
}
origin: com.oracle.coherence.incubator/coherence-messagingpattern

/**
 * Get the number of {@link MessageIdentifier}s in the {@link DefaultMessageTracker}.
 *
 * @return number of {@link MessageIdentifier}s
 */
public long size()
{
  long                     size   = 0;
  Collection<RangeWrapper> ranges = rangeWrapperMap.values();
  for (RangeWrapper wrapper : ranges)
  {
    size += wrapper.range.size();
  }
  return size;
}
origin: com.oracle.coherence.incubator/coherence-messagingpattern

/**
 * Remove a {@link MessageIdentifier} from the {@link DefaultMessageTracker}.  The {@link MessageIdentifier} is
 * not actually stored in the tracker but its partition identifier is used to look up the wrapper then
 * the messages sequence number is removed from the wrapper.
 *
 * @param messageIdentifier messages identifier
 * @return true if the message was removed
 */
public boolean remove(MessageIdentifier messageIdentifier)
{
  long         msgSeqNum = messageIdentifier.getMessageSequenceNumber();
  RangeWrapper wrapper   = ensureRangeWrapper(messageIdentifier);
  if (wrapper.range.contains(msgSeqNum))
  {
    wrapper.range = wrapper.range.remove(messageIdentifier.getMessageSequenceNumber());
    // putRangeInMap(newRange, messageIdentifier.getPartitionId());
    return true;
  }
  return false;
}
origin: com.oracle.coherence.incubator/coherence-messagingpattern

/**
 * {@inheritDoc}
 */
public MessageIdentifier getLast()
{
  RangeWrapper wrapper = ensureRangeWrapper(lastPartitionId);
  long         seqNum  = wrapper.range.getTo();
  return new MessageIdentifier(lastPartitionId, seqNum);
}
origin: com.oracle.coherence.incubator/coherence-commandpattern

ticketIssuerId = sequenceGenerator.next(2).getFrom();
ticketBook     = new TicketBook(ticketIssuerId);
origin: com.oracle.coherence.incubator/coherence-messagingpattern

/**
 * Add a {@link MessageIdentifier} to the {@link DefaultMessageTracker}.  The {@link MessageIdentifier} is
 * not actually stored in the tracker but its partition identifier is used to look up the wrapper then
 * the messages sequence number is added to the wrapper.
 *
 * @param messageIdentifier messages identifier
 * @return true if the message was added
 */
public boolean add(MessageIdentifier messageIdentifier)
{
  RangeWrapper wrapper = ensureRangeWrapper(messageIdentifier);
  wrapper.range = wrapper.range.add(messageIdentifier.getMessageSequenceNumber());
  // Update the max sequence number for this partition to prevent
  // duplicates
  if (messageIdentifier.getMessageSequenceNumber() > wrapper.maxSequenceNumber)
  {
    wrapper.maxSequenceNumber = messageIdentifier.getMessageSequenceNumber();
  }
  // Update the last partition of the message received by this tracker.
  lastPartitionId = messageIdentifier.getPartitionId();
  return true;
}
com.oracle.coherence.common.rangesRange

Most used methods

  • add
  • contains
  • getFrom
  • getTo
  • iterator
  • remove
  • size

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • BoxLayout (javax.swing)
  • Top PhpStorm 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