private Set<InternalDistributedMember> getAllRecipientsForEvent(InternalCache cache,
        String partitionedRegionName, int bucketId) {
      Set<InternalDistributedMember> recipients = new ObjectOpenHashSet<>();
      PartitionedRegion partitionedRegion =
          (PartitionedRegion) cache.getRegion(partitionedRegionName);
      if (partitionedRegion != null && partitionedRegion.getRegionAdvisor() != null) {
        final String bucketFullPath =
            SEPARATOR + PartitionedRegionHelper.PR_ROOT_REGION_NAME + SEPARATOR
                + partitionedRegion.getBucketName(bucketId);
        AbstractBucketRegionQueue bucketRegionQueue =
            (AbstractBucketRegionQueue) cache.getInternalRegionByPath(bucketFullPath);
        if (bucketRegionQueue != null && bucketRegionQueue.getBucketAdvisor() != null) {
          Set<InternalDistributedMember> bucketMembers =
              bucketRegionQueue.getBucketAdvisor().adviseInitialized();
          if (!bucketMembers.isEmpty()) {
            recipients.addAll(bucketMembers);
          } else {
            recipients.addAll(partitionedRegion.getRegionAdvisor().adviseDataStore());
          }
        } else {
          recipients.addAll(partitionedRegion.getRegionAdvisor().adviseDataStore());
        }
      }

      return recipients;
    }
Constructor : Creates and initializes the thread
geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java