/** * Takes a list of BucketProfileAndId and adds them to thsi advisors * proxy buckets. * @since 5.5 */ public void putBucketRegionProfiles(ArrayList l) { int size = l.size(); for (int i=0; i < size; i++) { BucketProfileAndId bp = (BucketProfileAndId)l.get(i); int id = bp.getId(); getBucket(id).getBucketAdvisor().putProfile(bp.getBucketProfile()); } } @Override
/** * Takes a list of BucketProfileAndId and adds them to thsi advisors * proxy buckets. * @since 5.5 */ public void putBucketRegionProfiles(ArrayList l) { int size = l.size(); for (int i=0; i < size; i++) { BucketProfileAndId bp = (BucketProfileAndId)l.get(i); int id = bp.getId(); getBucket(id).getBucketAdvisor().putProfile(bp.getBucketProfile()); } } @Override
/** * Update or create a bucket's meta-data * If this advisor has not completed initialization, upon return the profile will be enqueued for * processing during initialization, otherwise the profile will be immediately processed. * This architecture limits the blockage of threads during initialization. * @param bucketId the unique identifier of the bucket * @param profile the bucket meta-data from a particular member with the bucket */ public void putBucketProfile(int bucketId, BucketProfile profile) { synchronized (this.preInitQueueMonitor) { if (this.preInitQueue != null) { // Queue profile during pre-initialization QueuedBucketProfile qbf = new QueuedBucketProfile(bucketId, profile); this.preInitQueue.add(qbf); return; } } // Directly process profile post-initialization getBucket(bucketId).getBucketAdvisor().putProfile(profile); }
/** * Update or create a bucket's meta-data * If this advisor has not completed initialization, upon return the profile will be enqueued for * processing during initialization, otherwise the profile will be immediately processed. * This architecture limits the blockage of threads during initialization. * @param bucketId the unique identifier of the bucket * @param profile the bucket meta-data from a particular member with the bucket */ public void putBucketProfile(int bucketId, BucketProfile profile) { synchronized (this.preInitQueueMonitor) { if (this.preInitQueue != null) { // Queue profile during pre-initialization QueuedBucketProfile qbf = new QueuedBucketProfile(bucketId, profile); this.preInitQueue.add(qbf); return; } } // Directly process profile post-initialization getBucket(bucketId).getBucketAdvisor().putProfile(profile); }
assertTrue(ra.getBucket(i).getBucketAdvisor().putProfile(bp, forceBadProfile));
logger.trace(LogMarker.DA, "applying queued profile addition for bucket {}", qbp.bucketId); getBucket(qbp.bucketId).getBucketAdvisor().putProfile( qbp.bucketProfile);
+ qbp.bucketId); getBucket(qbp.bucketId).getBucketAdvisor().putProfile( qbp.bucketProfile);