PrimaryInfo(boolean isHosting, boolean isPrimary, String hToken) { this.isHosting = isHosting; this.isPrimary = isPrimary; this.hostToken = hToken; if (this.isPrimary) { Assert.assertTrue(this.isHosting); } } }
@Override protected void setMemoryThresholdFlag(MemoryEvent event) { Assert.assertTrue(false); //Bucket regions are not registered with ResourceListener, //and should not get this event }
/** establishes the logwriter used by the conduit */ public void setLogger(LogWriterI18n logger) { Assert.assertTrue(logger != null); this.logger = logger; }
/** destroy limit */ public void setDestroysLimit( long newValue ) { Assert.assertTrue(newValue > 0L, "destroys limit must be positive, an attempt was made to set it to: " + newValue); long oldValue = this.destroysLimit.get(); if (oldValue != newValue) { this.destroysLimit.set(newValue); stats.setLong( destroysLimitId, newValue ); } }
/** * Return the set of buckets which have storage assigned * * @return set of Integer bucketIds */ public Set<Integer> getBucketSet() { Assert.assertTrue(this.buckets != null); return new BucketSet(); }
static void send(InternalDistributedMember recipient, ReplySender dm, int procId, RemoteDestroyMessage sourceMessage, VersionTag<?> versionTag) { Assert .assertTrue(recipient != null, "DestroyReplyMessage NULL recipient"); DestroyReplyMessage m = new DestroyReplyMessage(recipient, procId, sourceMessage, versionTag); dm.putOutgoing(m); }
private void initialize(SearchLoadAndWriteProcessor processor, String theRegionName,int timeoutMS, CacheEvent theEvent, int actionType) { this.processorId = processor.processorId; this.regionName = theRegionName; this.timeoutMs = timeoutMS; this.event = theEvent; this.action = actionType; Assert.assertTrue(processor.region.getScope().isDistributed()); }
public void incrementBucketCount(Profile p) { PartitionProfile pp = (PartitionProfile) getProfile(p.getDistributedMember()); if (pp != null) { Assert.assertTrue(pp.isDataStore); pp.numBuckets++; } }
public PRQueryProcessor(PartitionedRegionDataStore prDS, DefaultQuery query, Object[] parameters, List buckets) { Assert.assertTrue(!buckets.isEmpty(), "bucket list can not be empty. "); this._prds = prDS; this._bucketsToQuery = buckets; ((GemFireCacheImpl)prDS.partitionedRegion.getCache()).getLocalQueryService(); this.query = query; this.parameters = parameters; PRQueryExecutor.initializeExecutorService(); }
public void assignBucketRegion(int bucketId, BucketRegion bukReg) { final Object oldbukReg = this.localBucket2RegionMap.putIfAbsent(Integer.valueOf(bucketId), bukReg); if(getLogWriter().fineEnabled()) { getLogWriter().fine("assigning bucket " + bukReg + " old assignment: " + oldbukReg); } Assert.assertTrue(oldbukReg==null); }
public boolean operate() throws InterruptedException { if (holdsLock() && reentryPolicy.preventReentry(DistributedMemberLock.this)) { return true; } boolean locked = dls.lockInterruptibly(key, -1, leaseTimeout); Assert.assertTrue(locked, "Failed to lockInterruptibly " + this); return locked; } });
/** Send an ack */ public static void send(InternalDistributedMember recipient, int processorId, ReplySender dm, boolean result, VersionedObjectList versions, ReplyException ex, PutAllPRMessage sourceMessage) { Assert.assertTrue(recipient != null, "PutAllReplyMessage NULL reply message"); PutAllReplyMessage m = new PutAllReplyMessage(processorId, result, versions, ex, sourceMessage); m.setRecipient(recipient); dm.putOutgoing(m); }
/** Send an ack */ public static void send(InternalDistributedMember recipient, int processorId, DM dm, long size) { Assert.assertTrue(recipient != null, "PRDistribuedGetReplyMessage NULL reply message"); BucketSizeReplyMessage m = new BucketSizeReplyMessage(processorId, size); m.setRecipient(recipient); dm.putOutgoing(m); }
public void not () { Object obj = this.stack.peek (); Assert.assertTrue (obj instanceof CompiledValue); if (obj instanceof Negatable) ((Negatable)obj).negate (); else push(new CompiledNegation ((CompiledValue)pop ())); }
/** Send an ack */ public static void send(InternalDistributedMember recipient, int processorId, EntrySnapshot value, DM dm, ReplyException re, FetchEntryMessage sourceMessage) { Assert.assertTrue(recipient != null, "FetchEntryReplyMessage NULL recipient"); FetchEntryReplyMessage m = new FetchEntryReplyMessage(processorId, value, re, sourceMessage); m.setRecipient(recipient); dm.putOutgoing(m); }
/** * This implementation only checks readiness and scope */ public Lock getRegionDistributedLock() throws IllegalStateException { checkReadiness(); checkForLimitedOrNoAccess(); Scope theScope = getAttributes().getScope(); Assert.assertTrue(theScope == Scope.LOCAL); throw new IllegalStateException(LocalizedStrings.LocalRegion_ONLY_SUPPORTED_FOR_GLOBAL_SCOPE_NOT_LOCAL.toLocalizedString()); }
public final void initTXState(TXStateInterface tx) { this.lockPolicy = tx.getLockingPolicy(); Assert.assertTrue(this.lockPolicy != null, "setLockingPolicy: unexpected null LockingPolicy"); this.txId = tx.getTransactionId(); this.txState = tx; this.txProxy = tx.getProxy(); this.currExecSeq = tx.getExecutionSequence(); }
private InternalDistributedMember getElderId() { InternalDistributedMember elder = this.dm.getElderId(); if (elder == null) { this.dm.getSystem().getCancelCriterion().checkCancelInProgress(null); } Assert.assertTrue(elder != null); return elder; }
/************** Public Methods ************************/ Object doNetSearch() throws TimeoutException { resetResults(); RegionAttributes attrs = region.getAttributes(); this.requestInProgress=true; Scope scope = attrs.getScope(); Assert.assertTrue(scope != Scope.LOCAL); netSearchForBlob(); this.requestInProgress=false; return this.result; }
public static IdentityUpdateResponse send(Set recipients, InternalDistributedSystem is, int currentPRId) { Assert.assertTrue(recipients != null, "IdentityUpdateMessage NULL recipients set"); IdentityRequestMessage.setLatestId(currentPRId); // set local value IdentityUpdateResponse p = new IdentityUpdateResponse(is, recipients); IdentityUpdateMessage m = new IdentityUpdateMessage(recipients, p.getProcessorId(), currentPRId); is.getDistributionManager().putOutgoing(m); // set remote values return p; }