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

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

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

origin: io.snappydata/gemfirexd

public String getName() {
 return this.member.getName();
}
origin: io.snappydata/snappydata-store-core

public String getName() {
 return this.member.getName();
}
origin: io.snappydata/gemfirexd-core

public String getName() {
 return this.member.getName();
}
origin: org.apache.geode/gemfire-core

private Map<String, String> prepareUserData(AlertDetails details) {
 Map<String, String> userData = new HashMap<String, String>();
 userData.put(JMXNotificationUserData.ALERT_LEVEL, AlertDetails.getAlertLevelAsString(details.getAlertLevel()));

 String source = details.getSource();
 userData.put(JMXNotificationUserData.THREAD, source);
 
 InternalDistributedMember sender = details.getSender();
 String nameOrId = memberSource; // TODO Rishi/Abhishek - what if sender is
 // null?
 if (sender != null) {
  nameOrId = sender.getName();
  nameOrId = nameOrId != null && !nameOrId.trim().isEmpty() ? nameOrId : sender.getId();
 }
 userData.put(JMXNotificationUserData.MEMBER, nameOrId);
 return userData;
}
origin: io.snappydata/gemfire-core

/**
 * Updates this SystemMember instance using the corresponding
 * InternalDistributedMember
 * 
 * @param member
 *          InternalDistributedMember instance to update this SystemMember
 *          
 * @since 6.5
 */
private void updateByInternalDistributedMember(
  InternalDistributedMember member) {
 if (member != null) {
  this.internalId = member;
  this.id         = this.internalId.toString();
  this.host       = this.internalId.getHost();
  this.name       = this.internalId.getName();      
  if (this.name == null || 
    DistributionConfig.DEFAULT_NAME.equals(this.name)) { 
   /*
    * name could be null & referring to description of a fix for 32877
    */
   this.name = this.id;
  }
 }
}

origin: org.apache.geode/gemfire-core

/**
 * Updates this SystemMember instance using the corresponding
 * InternalDistributedMember
 * 
 * @param member
 *          InternalDistributedMember instance to update this SystemMember
 *          
 * @since 6.5
 */
private void updateByInternalDistributedMember(
  InternalDistributedMember member) {
 if (member != null) {
  this.internalId = member;
  this.id         = this.internalId.toString();
  this.host       = this.internalId.getHost();
  this.name       = this.internalId.getName();      
  if (this.name == null || 
    DistributionConfig.DEFAULT_NAME.equals(this.name)) { 
   /*
    * name could be null & referring to description of a fix for 32877
    */
   this.name = this.id;
  }
 }
}

origin: io.snappydata/gemfire-core

public void memberSuspect(InternalDistributedMember id,
  InternalDistributedMember whoSuspected) {
 Notification notification = new Notification(
   ResourceNotification.CACHE_MEMBER_SUSPECT, MBeanJMXAdapter
     .getMemberNameOrId(id), SequenceNumber.next(), System
     .currentTimeMillis(),
   ResourceNotification.CACHE_MEMBER_SUSPECT_PREFIX
     + MBeanJMXAdapter.getMemberNameOrId(id) + " By : "
     + whoSuspected.getName());
 systemLevelNotifEmitter.sendNotification(notification);
}
origin: org.apache.geode/gemfire-core

 public void memberSuspect(InternalDistributedMember id,
   InternalDistributedMember whoSuspected) {

  Notification notification = new Notification(
    JMXNotificationType.CACHE_MEMBER_SUSPECT, MBeanJMXAdapter
      .getMemberNameOrId(id), SequenceNumber.next(), System
      .currentTimeMillis(),
      ManagementConstants.CACHE_MEMBER_SUSPECT_PREFIX
      + MBeanJMXAdapter.getMemberNameOrId(id) + " By : "
      + whoSuspected.getName());
  systemLevelNotifEmitter.sendNotification(notification);

 }
}
origin: org.apache.geode/gemfire-core

String myName = getName();
if (vmPid > 0 || vmKind != DistributionManager.NORMAL_DM_TYPE || !"".equals(myName)) {
 sb.append("(");
origin: io.snappydata/gemfire-core

String myName = getName();
if (vmPid > 0 || vmKind != DistributionManager.NORMAL_DM_TYPE
  || vmKindStr != null || !"".equals(myName)) {
origin: io.snappydata/gemfire-hydra-tests

public void testNonDefaultName() {
 Properties config = new Properties();
 config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0"); 
 config.setProperty(DistributionConfig.LOCATORS_NAME, ""); 
 config.setProperty(DistributionConfig.NAME_NAME, "nondefault");
 InternalDistributedSystem system = getSystem(config);
 try {
  assertEquals("nondefault", system.getConfig().getName());
  DM dm = system.getDistributionManager();
  InternalDistributedMember member = dm.getDistributionManagerId();
  
  assertEquals("nondefault", member.getName());
 } 
 finally {
  system.disconnect();
 }
}
origin: io.snappydata/gemfire-core

public PersistentMemberID generatePersistentID(DiskRegionView dr) {
 File firstDir = getInfoFileDir().getDir();
 InternalDistributedSystem ids = getCache().getDistributedSystem();
 InternalDistributedMember memberId = ids.getDistributionManager()
   .getDistributionManagerId();
 
 //NOTE - do NOT use DM.cacheTimeMillis here. See bug #49920
 long timestamp = System.currentTimeMillis();
 PersistentMemberID id = new PersistentMemberID(getDiskStoreID(), memberId.getIpAddress(),
   firstDir.getAbsolutePath(), memberId.getName(),
   timestamp, (short) 0);
 return id;
}
origin: org.apache.geode/gemfire-core

public PersistentMemberID generatePersistentID(DiskRegionView dr) {
 File firstDir = getInfoFileDir().getDir();
 InternalDistributedSystem ids = getCache().getDistributedSystem();
 InternalDistributedMember memberId = ids.getDistributionManager()
   .getDistributionManagerId();
 
 //NOTE - do NOT use DM.cacheTimeMillis here. See bug #49920
 long timestamp = System.currentTimeMillis();
 PersistentMemberID id = new PersistentMemberID(getDiskStoreID(), memberId.getInetAddress(),
   firstDir.getAbsolutePath(), memberId.getName(),
   timestamp, (short) 0);
 return id;
}
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-core

/**
 * Sends the alert with the Object source as member. This notification will
 * get filtered out for particular alert level
 * 
 * @param details
 */
public void handleSystemNotification(AlertDetails details) {
 if (!isServiceInitialised("handleSystemNotification")) {
  return;
 }
 if (service.isManager()) {
  String systemSource = "DistributedSystem(" + service.getDistributedSystemMXBean().getDistributedSystemId() + ")";
  Notification notification = new Notification(ResourceNotification.SYSTEM_ALERT, systemSource, SequenceNumber
    .next(), details.getMsgTime().getTime(), details.toString());
  InternalDistributedMember sender = details.getSender();
  String nameOrId = memberSource; // TODO Rishi/Abhishek - what if sender is
                  // null?
  if (sender != null) {
   nameOrId = sender.getName();
   nameOrId = nameOrId != null && !nameOrId.trim().isEmpty() ? nameOrId : sender.getId();
  }
  notification.setUserData(nameOrId);
  service.handleNotification(notification);
 }
}
origin: org.apache.geode/gemfire-core

if (!"".equals(id.getName())) {
 for (InternalDistributedMember m: (List<InternalDistributedMember>)dm.getViewMembers()) {
  if (m.equals(id)) {
  if (id.getName().equals(m.getName())) {
   if (dm.getMembershipManager().verifyMember(m, "member is using the name of " + id)) {
    throw new IncompatibleSystemException("Member " + id + " could not join this distributed system because the existing member " + m + " used the same name. Set the \"name\" gemfire property to a unique value.");
origin: org.apache.geode/gemfire-core

this.name = cache.getDistributedSystem().getDistributedMember().getName();
this.id = cache.getDistributedSystem().getDistributedMember().getId();
origin: io.snappydata/gemfire-core

if (!"".equals(id.getName())) {
 for (InternalDistributedMember m: (Vector<InternalDistributedMember>)dm.getViewMembers()) {
  if (m.equals(id)) {
  if (id.getName().equals(m.getName())) {
   if (dm.getMembershipManager().verifyMember(m, "member is using the name of " + id)) {
    throw new IncompatibleSystemException("Member " + id + " could not join this distributed system because the existing member " + m + " used the same name. Set the \"name\" gemfire property to a unique value.");
origin: io.snappydata/gemfire-core

this.name = cache.getDistributedSystem().getDistributedMember().getName();
this.id = cache.getDistributedSystem().getDistributedMember().getId();
com.gemstone.gemfire.distributed.internal.membershipInternalDistributedMembergetName

Javadoc

Returns the name of this member's distributed system connection or null if no name was specified.

Popular methods of InternalDistributedMember

  • <init>
    Construct a InternalDistributedMember. All fields are specified. This, and the following constructor
  • equals
  • toString
  • getHost
  • getId
  • 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
  • getVersionObject
  • getProcessId,
  • getVersionObject,
  • fromData,
  • getDirectChannelPort,
  • getGroups,
  • getNetMember,
  • getVmViewId,
  • toData,
  • _readEssentialData

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • setScale (BigDecimal)
  • getSystemService (Context)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JLabel (javax.swing)
  • JOptionPane (javax.swing)
  • Top 12 Jupyter Notebook extensions
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