@Override protected void setMemoryThresholdFlag(MemoryEvent event) { Assert.assertTrue(false); // Bucket regions are not registered with ResourceListener, // and should not get this event }
/** * This method is meant to be overridden by DistributedRegion and PartitionedRegions to cleanup * CRITICAL state */ public void removeCriticalMember(DistributedMember member) { // should not be called for LocalRegion Assert.assertTrue(false); }
@Override protected boolean operateOnRegion(CacheEvent event, ClusterDistributionManager dm) throws EntryNotFoundException { Assert.assertTrue(false, "Region Destruction message implementation is in basicProcess, not this method"); return false; }
/** * @param count the number of times {@link #countDown} must be invoked before threads can pass * through {@link #await()} * * @throws IllegalArgumentException if {@code count} is negative */ public StoppableCountDownLatch(CancelCriterion stopper, int count) { Assert.assertTrue(stopper != null); this.latch = new CountDownLatch(count); this.stopper = stopper; }
public void assignBucketRegion(int bucketId, BucketRegion bukReg) { final Object oldbukReg = this.localBucket2RegionMap.putIfAbsent(Integer.valueOf(bucketId), bukReg); if (logger.isDebugEnabled()) { logger.debug("assigning bucket {} old assignment: {}", bukReg, oldbukReg); } Assert.assertTrue(oldbukReg == null); }
/** * Adds exceptions thrown from different nodes to a ds * * @since GemFire 6.5 */ public void addException(Throwable cause) { Assert.assertTrue(cause != null, "unexpected null exception to add to FunctionException"); getExceptions().add(cause); }
/** * Get the redundancy of the this bucket, taking into account the local bucket, if any. * * @return number of redundant copies for a given bucket, or -1 if there are no instances of the * bucket. */ public int getBucketRedundancy(int bucketId) { Assert.assertTrue(this.buckets != null); return this.buckets[bucketId].getBucketRedundancy(); }
/** * Return the set of all members who currently own the bucket, including the local owner, if * applicable * * @return a set of {@link InternalDistributedMember}s that own the bucket */ public Set<InternalDistributedMember> getBucketOwners(int bucketId) { Assert.assertTrue(this.buckets != null); return this.buckets[bucketId].getBucketOwners(); }
private static void checkOffset(String name, int offset) { int id = myType.nameToId(name); Assert.assertTrue(offset == id, "Expected the offset for " + name + " to be " + offset + " but it was " + id); }
private void readResourceInstanceDeleteToken() throws IOException { int resourceInstId = dataIn.readInt(); Assert.assertTrue(resourceInstTable[resourceInstId] != null); resourceInstTable[resourceInstId].makeInactive(); if (dump) { System.out.println("Delete resource instance " + resourceInstId); } }
/** * Adds exceptions thrown from different nodes to a ds * * @since GemFire 6.5 */ public void addException(Throwable cause) { Assert.assertTrue(cause != null, "unexpected null exception to add to FunctionException"); getExceptions().add(cause); }
@Override public void process(DistributionMessage msg) { try { Assert.assertTrue(msg instanceof NonGrantorDestroyedReplyMessage, "NonGrantorDestroyedProcessor is unable to process message of type " + msg.getClass()); this.reply = (NonGrantorDestroyedReplyMessage) msg; } finally { super.process(msg); } }
/** Send an ack */ public static void send(InternalDistributedMember recipient, int processorId, ReplySender replySender, boolean containsKeyValue) { Assert.assertTrue(recipient != null, "ContainsKeyValueReplyMessage NULL reply message"); ContainsKeyValueReplyMessage m = new ContainsKeyValueReplyMessage(processorId, containsKeyValue); m.setRecipient(recipient); replySender.putOutgoing(m); }
/** * This implementation only checks readiness and scope */ @Override public Lock getDistributedLock(Object key) throws IllegalStateException { checkReadiness(); checkForLimitedOrNoAccess(); Scope theScope = getAttributes().getScope(); Assert.assertTrue(theScope == Scope.LOCAL); throw new IllegalStateException( "Only supported for GLOBAL scope, not LOCAL"); }
public NonLocalRegionEntryWithStats(RegionEntry re, LocalRegion br, boolean allowTombstones) { super(re, br, allowTombstones); try { this.lastAccessed = re.getLastAccessed(); this.hitCount = re.getHitCount(); this.missCount = re.getMissCount(); } catch (InternalStatisticsDisabledException unexpected) { Assert.assertTrue(false, "Unexpected " + unexpected); } }
/** Send an ack */ public static void send(InternalDistributedMember recipient, int processorId, DistributionManager dm, ReplyException re, byte responseCode) { Assert.assertTrue(recipient != null, "BecomePrimaryBucketReplyMessage NULL recipient"); BecomePrimaryBucketReplyMessage m = new BecomePrimaryBucketReplyMessage(processorId, re, responseCode); m.setRecipient(recipient); dm.putOutgoing(m); }
/** Send an ack */ public static void send(InternalDistributedMember recipient, int processorId, ReplySender replySender, VersionTag<?> versionTag, ReplyException ex) { Assert.assertTrue(recipient != null, "InvalidateReplyMessage NULL reply message"); InvalidateReplyMessage m = new InvalidateReplyMessage(processorId, versionTag, ex); m.setRecipient(recipient); replySender.putOutgoing(m); }
/** Send a reply */ public static void send(InternalDistributedMember recipient, int processorId, DistributionManager dm, ReplyException re) { Assert.assertTrue(recipient != null, "DeposePrimaryBucketReplyMessage NULL recipient"); DeposePrimaryBucketReplyMessage m = new DeposePrimaryBucketReplyMessage(processorId, re); m.setRecipient(recipient); dm.putOutgoing(m); }
/** Send an ack */ public static void send(InternalDistributedMember recipient, int processorId, DistributionManager dm, int size) { Assert.assertTrue(recipient != null, "SizeReplyMessage NULL reply message"); SizeReplyMessage m = new SizeReplyMessage(processorId, size); m.setRecipient(recipient); dm.putOutgoing(m); }
/** Send a reply */ public static void send(InternalDistributedMember recipient, int processorId, DistributionManager dm, ReplyException re, boolean removed) { Assert.assertTrue(recipient != null, "RemoveBucketReplyMessage NULL recipient"); RemoveBucketReplyMessage m = new RemoveBucketReplyMessage(processorId, re, removed); m.setRecipient(recipient); dm.putOutgoing(m); }