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

How to use
RegionQueue
in
com.gemstone.gemfire.internal.cache

Best Java code snippets using com.gemstone.gemfire.internal.cache.RegionQueue (Showing top 20 results out of 315)

origin: io.snappydata/gemfire-hydra-tests

public boolean done() {
 size = 0;
 for (RegionQueue q : queues) {
  size += q.size();
 }
 if (size == regionSize) {
  return true;
 }
 return false;
}
origin: io.snappydata/gemfire-hydra-tests

public boolean done() {
 boolean done = numQueueEntries == queues
   .toArray(new RegionQueue[queues.size()])[0].getRegion().size();
 return done;
}
origin: org.apache.geode/gemfire-core

@Override
public void addCacheListener(CacheListener listener) {
  this.processors[0].getQueue().addCacheListener(listener);    
}
origin: org.apache.geode/gemfire-core

public void closeProcessor() {
 if (logger.isDebugEnabled()) {
  logger.debug("Closing dispatcher");
 }
 try {
  if (this.sender.isPrimary() && this.queue.size() > 0) {
   logger.warn(LocalizedMessage.create(LocalizedStrings.GatewayImpl_DESTROYING_GATEWAYEVENTDISPATCHER_WITH_ACTIVELY_QUEUED_DATA));
  }
 } catch (RegionDestroyedException ignore) {
 } catch (CancelException ignore) {
 } catch (CacheException ignore) {
  // just checking in case we should log a warning
 } finally {
  this.queue.close();
  if (logger.isDebugEnabled()) {
   logger.debug("Closed dispatcher");
  }
 }
}
origin: org.apache.geode/gemfire-core

protected void destroyProcessor() {
 if (logger.isDebugEnabled()) {
  logger.debug("Destroying dispatcher");
 }
 try {
  try {
   if (this.queue.peek() != null) {
    logger.warn(LocalizedMessage.create(LocalizedStrings.GatewayImpl_DESTROYING_GATEWAYEVENTDISPATCHER_WITH_ACTIVELY_QUEUED_DATA));
   }
  } catch (InterruptedException e) {
   /*
    * ignore, 
    */
   // TODO if this won't be thrown, assert it.
  }
 } catch (CacheException ignore) {
  // just checking in case we should log a warning
 } finally {
  this.queue.getRegion().localDestroyRegion();
  if (logger.isDebugEnabled()) {
   logger.debug("Destroyed dispatcher");
  }
 }
}

origin: org.apache.geode/gemfire-core

this.queue.removeCacheListener();
this.unprocessedTokens = null;
  Iterator it = this.queue.getRegion().values().iterator();
  while (it.hasNext() && !stopped()) {
   Object o = it.next();
  new Object[] {getSender(), Integer.valueOf(this.queue.size())}));
Iterator it = this.queue.getRegion().values().iterator();
while (it.hasNext() && !stopped()) {
 Object o = it.next();
origin: io.snappydata/gemfire-hydra-tests

public static Integer getQueueContentSize(final String senderId) {
 Set<GatewaySender> senders = cache.getGatewaySenders();
 GatewaySender sender = null;
 for (GatewaySender s : senders) {
  if (s.getId().equals(senderId)) {
   sender = s;
   break;
  }
 }
 if (sender instanceof SerialGatewaySenderImpl) {
  final Set<RegionQueue> queues = ((SerialGatewaySenderImpl)sender)
    .getQueues();
  int size = 0;
  for (RegionQueue q : queues) {
   size += q.size();
  }
  return size;
 } else if (sender instanceof ParallelGatewaySenderImpl) {
  RegionQueue regionQueue = null;
  regionQueue = ((ParallelGatewaySenderImpl)sender).getQueues().toArray(
    new RegionQueue[1])[0];
  return regionQueue.getRegion().size();
 }
 return 0;
}

origin: io.snappydata/gemfire-junit

RegionQueue regionqueue = createHARegionQueue("testing");
for (int i = 0; i < 10; ++i) {
 regionqueue.put(new ConflatableObject("key" + (i + 1), "value",
   new EventID(new byte[] { 1 }, 1, i + 1), true, "testing"));
origin: io.snappydata/gemfire-hydra-tests

  .getQueues();
for (RegionQueue rq : sqSet) {
 rq.addCacheListener((CacheListener) queueListenerInstance);
  .getQueues().toArray()[0];
PartitionedRegion region = (PartitionedRegion) parallelQueue
  .getRegion();
for (int i = 0; i < region.getTotalNumberOfBuckets(); i++) {
 BucketRegion br = region.getBucketRegion(i);
origin: io.snappydata/gemfire-junit

  "testing");
regionqueue.put(cf1);
synchronized (this) {
 if (!expiryCalled) {
 Object o = regionqueue.take();
 assertNull(o);
origin: org.apache.geode/gemfire-core

protected void eventQueueRemove() throws CacheException,
  InterruptedException {
 this.queue.remove();
}
origin: io.snappydata/gemfire-core

protected void closeProcessor()
{
 if (getLogger().fineEnabled()) {
  getLogger().fine("Closing dispatcher");
 }
 try {
  try {
   if (this._eventQueue.peek() != null) {
    getLogger()
      .warning(LocalizedStrings.GatewayImpl_DESTROYING_GATEWAYEVENTDISPATCHER_WITH_ACTIVELY_QUEUED_DATA);
   }
  }
  catch (InterruptedException e) {
   /*
    * ignore, this will never be thrown by
    * SingleWriteSingleReadRegionQueue
    */
   // TODO if this won't be thrown, assert it.
  }
 }
 catch (CacheException ignore) {
  // just checking in case we should log a warning
 }
 finally {
  this._eventQueue.close();
  if (getLogger().fineEnabled()) {
   getLogger().fine("Closed dispatcher");
  }
 }
}
origin: org.apache.geode/gemfire-core

 events = this.queue.peek(batchSize, batchTimeInterval);
} catch (InterruptedException e) {
 interrupted = true;
origin: io.snappydata/gemfire-core

@Override
public void removeCacheListener() {
 this.queue.removeCacheListener();
}

origin: io.snappydata/gemfire-core

protected Object eventQueueTake() throws CacheException, InterruptedException {
 return this._eventQueue.take();
}
origin: io.snappydata/gemfire-core

this.queue.removeCacheListener();
this.unprocessedTokens = null;
  Iterator it = this.queue.getRegion().values().iterator();
  while (it.hasNext() && !stopped()) {
   Object o = it.next();
  new Object[] {getSender(), Integer.valueOf(this.queue.size())});
Iterator it = this.queue.getRegion().values().iterator();
while (it.hasNext() && !stopped()) {
 Object o = it.next();
origin: io.snappydata/gemfire-hydra-tests

public static void checkAsyncEventQueueSize(String asyncQueueId, int numQueueEntries) {
 AsyncEventQueue theAsyncEventQueue = null;
 
 Set<AsyncEventQueue> asyncEventChannels = cache.getAsyncEventQueues();
 for (AsyncEventQueue asyncChannel : asyncEventChannels) {
  if (asyncQueueId.equals(asyncChannel.getId())) {
   theAsyncEventQueue = asyncChannel;
  }
 }
 
 GatewaySender sender = ((AsyncEventQueueImpl)theAsyncEventQueue).getSender();
 
 if (sender instanceof ParallelGatewaySenderImpl) {
  Set<RegionQueue> queues = ((ParallelGatewaySenderImpl)sender).getQueues();
  assertEquals(numQueueEntries,
    queues.toArray(new RegionQueue[queues.size()])[0].getRegion().size());
 } else {
  Set<RegionQueue> queues = ((SerialGatewaySenderImpl)sender).getQueues();
  int size = 0;
  for (RegionQueue q : queues) {
   size += q.size();
  }
  assertEquals(numQueueEntries, size);
 }
}

origin: io.snappydata/gemfire-core

public void closeProcessor() {
 if (getLogger().fineEnabled()) {
  getLogger().fine("Closing dispatcher");
 }
 try {
  if (this.sender.isPrimary() && this.queue.size() > 0) {
   getLogger()
   .warning(
     LocalizedStrings.GatewayImpl_DESTROYING_GATEWAYEVENTDISPATCHER_WITH_ACTIVELY_QUEUED_DATA);
  }
 } catch (RegionDestroyedException ignore) {
 } catch (CancelException ignore) {
 } catch (CacheException ignore) {
  // just checking in case we should log a warning
 } finally {
  this.queue.close();
  if (getLogger().fineEnabled()) {
   getLogger().fine("Closed dispatcher");
  }
 }
}
origin: io.snappydata/gemfire-core

 if (this.queue.peek() != null) {
  getLogger()
    .warning(
if (this.queue.getRegion() != null) {
  this.queue.getRegion().localDestroyRegion();
origin: org.apache.geode/gemfire-core

 this.queue.put(gatewayEvent);
} catch (InterruptedException e) {
com.gemstone.gemfire.internal.cacheRegionQueue

Javadoc

Interface RegionQueue is an interface for queue implementations backed by regions.

Most used methods

  • size
    Returns the size of the queue
  • getRegion
    Returns the underlying region that backs this queue.
  • addCacheListener
    Add a CacheListener to the queue
  • put
    Puts an object onto the tail of the queue
  • close
  • peek
    Peeks either a batchSize number of elements from the queue or until timeToWait milliseconds have ela
  • remove
  • removeCacheListener
    Remove the CacheListener from the queue
  • take
    Takes up to batchSize number of objects from the head of the queue. As soon as it gets a null respon
  • estimateMemoryFootprint
    Estimate constant memory usage of the queue excluding the queue entries.
  • release
  • release

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 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