Tabnine Logo
InternalDistributedMember.getGroups
Code IndexAdd Tabnine to your IDE (free)

How to use
getGroups
method
in
com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember

Best Java code snippets using com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember.getGroups (Showing top 10 results out of 315)

origin: org.apache.geode/gemfire-core

public Set<DistributedMember> getGroupMembers(String group) {
 if (getDistributionManagerId().getGroups().contains(group)) {
  return Collections.singleton((DistributedMember)getDistributionManagerId());
 } else {
  return Collections.emptySet();
 }
}
origin: io.snappydata/gemfire-core

public Set<DistributedMember> getGroupMembers(String group) {
 if (getDistributionManagerId().getGroups().contains(group)) {
  return Collections.singleton((DistributedMember)getDistributionManagerId());
 } else {
  return Collections.emptySet();
 }
}
origin: io.snappydata/gemfire-core

public String[] getGroups() {
 List<String> groups = cache.getDistributedSystem().getDistributedMember().getGroups();
 String[] groupsArray = new String[groups.size()];
 groupsArray = groups.toArray(groupsArray);
 return groupsArray;
}
origin: org.apache.geode/gemfire-core

public String[] getGroups() {
 List<String> groups = cache.getDistributedSystem().getDistributedMember().getGroups();
 String[] groupsArray = new String[groups.size()];
 groupsArray = groups.toArray(groupsArray);
 return groupsArray;
}
origin: io.snappydata/gemfire-hydra-tests

@Override
public void execute(FunctionContext context) {
 ArrayList<String> args = (ArrayList<String>) context.getArguments();
 if (args.get(0).equals("runtime")) {
  if (args.size() > 1) {
   String group = args.get(1);
   InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance();
   if (ds.getDistributedMember().getGroups().contains(group)) {
    throw new NullPointerException();
   }
  } else {
   throw new NullPointerException();
  }
 } else {
  InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance();
  if (args.size() > 1) {
   String group = args.get(1);
   if (ds.getDistributedMember().getGroups().contains(group)) {
    ds.disconnect();
   }
  } else {
   ds.disconnect();
  }
 }
 context.getResultSender().lastResult(Boolean.TRUE);
}
origin: io.snappydata/gemfire-hydra-tests

assertEquals(bothList, member.getGroups());
origin: io.snappydata/gemfire-hydra-tests

/**
 * Tests default settings.
 */
public void testDefaults() {
 Properties config = new Properties();
 config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0"); 
 config.setProperty(DistributionConfig.LOCATORS_NAME, ""); 
 config.setProperty(DistributionConfig.ROLES_NAME, "");
 config.setProperty(DistributionConfig.GROUPS_NAME, "");
 config.setProperty(DistributionConfig.NAME_NAME, "");
 InternalDistributedSystem system = getSystem(config);
 try {
  assertTrue(system.getConfig().getRoles().equals(
    DistributionConfig.DEFAULT_ROLES));
  assertTrue(system.getConfig().getGroups().equals(
    DistributionConfig.DEFAULT_ROLES));
  assertTrue(system.getConfig().getName().equals(
    DistributionConfig.DEFAULT_NAME));
  DM dm = system.getDistributionManager();
  InternalDistributedMember member = dm.getDistributionManagerId();
  
  Set roles = member.getRoles();
  assertEquals(0, roles.size());
  assertEquals("", member.getName());
  assertEquals(Collections.emptyList(), member.getGroups());
 } 
 finally {
  system.disconnect();
 }
}
origin: io.snappydata/gemfire-hydra-tests

@Override
public void execute(FunctionContext context) {
 getLogWriter().fine("SWAP:1:executing OnGroupsFunction:"+invocationCount);
 InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance();
 invocationCount++;
 ArrayList<String> l = (ArrayList<String>) context.getArguments();
 if (l != null) {
  assertFalse(Collections.disjoint(l, ds.getDistributedMember().getGroups()));
 }
 context.getResultSender().lastResult(Boolean.TRUE);
}
origin: io.snappydata/gemfire-core

for (Iterator<InternalDistributedMember> iterator = allMembers.iterator(); iterator.hasNext();) {
 InternalDistributedMember member = iterator.next();
 List<String> memberGroups = member.getGroups();
 if (!Collections.disjoint(targetedGroups, memberGroups)) {
  selectedMembers.add(member);
origin: org.apache.geode/gemfire-core

for (Iterator<InternalDistributedMember> iterator = allMembers.iterator(); iterator.hasNext();) {
 InternalDistributedMember member = iterator.next();
 List<String> memberGroups = member.getGroups();
 if (!Collections.disjoint(targetedGroups, memberGroups)) {
  selectedMembers.add(member);
com.gemstone.gemfire.distributed.internal.membershipInternalDistributedMembergetGroups

Popular methods of InternalDistributedMember

  • <init>
    Construct a InternalDistributedMember. All fields are specified. This, and the following constructor
  • equals
  • toString
  • getHost
  • getId
  • getName
    Returns the name of this member's distributed system connection or null if no name was specified.
  • getPort
    Return the underlying port (membership port)
  • getRoles
    Returns an unmodifiable Set of this member's Roles.
  • getVmKind
    [GemStone] Returns the kind of VM that hosts the distribution manager with this address.
  • hashCode
  • getIpAddress
    Return the underlying host address
  • getProcessId
  • getIpAddress,
  • getProcessId,
  • getVersionObject,
  • fromData,
  • getDirectChannelPort,
  • getNetMember,
  • getVmViewId,
  • toData,
  • _readEssentialData

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Top plugins for Android Studio
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