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

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

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

origin: io.snappydata/gemfire-junit

@Override
protected void setUp() throws Exception {
 super.setUp();
 member = new InternalDistributedMember(InetAddress.getLocalHost(), 12345);
}
origin: io.snappydata/gemfire-core

@Override
public boolean equals(Object obj)
{
 if ((obj == null) || !(obj instanceof DataStoreBuckets)) {
  return false;
 }
 DataStoreBuckets other = (DataStoreBuckets) obj;
 return this.numBuckets == other.numBuckets &&
  this.memberId.equals(other.memberId);
}
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

/** this writes just the parts of the ID that are needed for comparisons and communications */
 public static InternalDistributedMember readEssentialData(DataInput in)
  throws IOException, ClassNotFoundException {
  final InternalDistributedMember mbr = new InternalDistributedMember();
  mbr._readEssentialData(in);
  return mbr;
 }
 
origin: io.snappydata/gemfire-core

/** A unique string representation of this member that will never change */
public String canonicalString() {
 return getIpAddress().getHostAddress() + '(' + getVmPid() + "):" + getPort();
}
origin: org.apache.geode/gemfire-core

public JGAddress(InternalDistributedMember idm) {
 super();
 GMSMember mbr = (GMSMember)idm.getNetMember();
 this.mostSigBits = mbr.getUuidMSBs();
 this.leastSigBits = mbr.getUuidLSBs();
 this.ip_addr = idm.getInetAddress();
 this.port = idm.getPort();
 this.vmViewId = idm.getVmViewId();
}
origin: org.apache.geode/gemfire-core

public String getId() {
 return toString();
}
 /*if (this.ipAddr == null) {
origin: io.snappydata/gemfirexd-core

public MemoryAnalyticsVTI(boolean internalOnly) {
 isForInternalUse = internalOnly;
 stats = Misc.getMemStore().getStoreStatistics();
 host = Misc.getMyId().getHost();
 member = Misc.getMyId().getId();
 sizer = ObjectSizer.getInstance(this.isForInternalUse);
 if (TEST_MODE) {
  partialResult = new ArrayList<DataValueDescriptor[]>();
 }
}
origin: io.snappydata/gemfire-hydra-tests

/**
 * Returns true if the given DistributedMember is a locator
 */
public static boolean isLocatorMember(DistributedMember mbr) {
 return ((InternalDistributedMember)mbr).getVmKind() == DistributionManager.LOCATOR_DM_TYPE;
}

origin: org.apache.geode/gemfire-core

/** Returns a set of all roles currently in the distributed system. */
public Set getAllRoles() {
 return id.getRoles();
}
origin: io.snappydata/gemfire-core

@Override
public int hashCode() {
 return memberId.hashCode();
}
@Override
origin: io.snappydata/gemfire-core

public static String getUniqueIDForMember(DistributedMember member) {
 InternalDistributedMember iMember = (InternalDistributedMember) member;
 final StringBuilder sb = new StringBuilder();
 sb.append(iMember.getIpAddress().getHostAddress());
 sb.append("<v" + iMember.getVmViewId() + ">"); // View ID will be 0 for
 // Loner, but in that case no
 // federation as well
 sb.append(iMember.getPort());
 return makeCompliantName(sb.toString().toLowerCase());// Lower case to
 // handle IPv6
}
origin: org.apache.geode/gemfire-core

@Override
public void memberSuspect(InternalDistributedMember id, InternalDistributedMember whoSuspected, String reason) {
 if (logger.isDebugEnabled()) {
  logger.debug("ManagementMembershipListener member suspected .. {}", id.getId());
 }
 if (service.isManager()) {
  if (logger.isDebugEnabled()) {
   logger.debug("Suspecting member {}", id.getId());
  }
  service.getFederatingManager().suspectMember(id, whoSuspected, reason);
 }
}
origin: io.snappydata/gemfire-hydra-tests

String debugContains(DistributedMember member) {
 StringBuffer sb = new StringBuffer();
 for (DistributedMember peer : getMembers()) {
  if (!peer.equals(member)) {
   InternalDistributedMember peerIDM = (InternalDistributedMember)peer;
   InternalDistributedMember memberIDM = (InternalDistributedMember)member;
   sb.append("peer port=").append(peerIDM.getPort()).append(" ");
   sb.append("member port=").append(memberIDM.getPort()).append(" ");
  }
 }
 return sb.toString();
}

origin: io.snappydata/snappydata-store-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: org.apache.geode/gemfire-core

public static String getUniqueIDForMember(DistributedMember member) {
 InternalDistributedMember iMember = (InternalDistributedMember) member;
 final StringBuilder sb = new StringBuilder();
 sb.append(iMember.getInetAddress().getHostAddress());
 sb.append("<v" + iMember.getVmViewId() + ">"); // View ID will be 0 for
 // Loner, but in that case no
 // federation as well
 sb.append(iMember.getPort());
 return makeCompliantName(sb.toString().toLowerCase());// Lower case to
 // handle IPv6
}

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: io.snappydata/gemfire-core

@Override
public void execute(final FunctionContext context) {
 InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance();
 if (ds.isConnected()) {
  InternalDistributedMember distributedMember = ds.getDistributedMember();
  String host = distributedMember.getHost();
  NetstatFunctionArgument args = (NetstatFunctionArgument)context.getArguments();
  boolean withlsof = args.isWithlsof();
  String lineSeparator = args.getLineSeparator();
  String netstatOutput = executeCommand(lineSeparator, withlsof);
  StringBuilder netstatInfo = new StringBuilder();
  addMemberHostHeader(netstatInfo, "{0}", host, lineSeparator); //{0} will be replaced on Manager
  context.getResultSender().lastResult(new NetstatFunctionResult(host, netstatInfo.toString(), CliUtil.compressBytes(netstatOutput.getBytes())));
 }
}
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;
}
com.gemstone.gemfire.distributed.internal.membershipInternalDistributedMember

Javadoc

This is the fundamental representation of a member of a GemFire distributed system.

Most used methods

  • <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,
  • getGroups,
  • getNetMember,
  • getVmViewId,
  • toData,
  • _readEssentialData

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JLabel (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • 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