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

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

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

origin: io.snappydata/gemfire-core

/** Create a TCPConduit stub from a JGroups InternalDistributedMember */
public Stub createConduitStub(InternalDistributedMember addr) {
 int port = addr.getDirectChannelPort();
 Stub stub = new Stub(addr.getIpAddress(), port, addr.getVmViewId());
 return stub;
}

origin: io.snappydata/gemfire-core

InternalDistributedMember idm = (InternalDistributedMember)it.next();
if (idm.getIpAddress().equals(s.getInetAddress())
  && idm.getDirectChannelPort() == s.getPort()) {
 addChannel(idm, s);
 return idm;
origin: io.snappydata/gemfire-hydra-tests

public void testUDPPortRange() throws Exception {
 Properties config = new Properties();
 int mcastPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
 int unicastPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
 config.setProperty("mcast-port", String.valueOf(mcastPort));
 config.setProperty("locators", "");
 // Minimum 3 ports required in range for UDP, FD_SOCK and TcpConduit.
 config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, 
   ""+unicastPort+"-"+(unicastPort+2)); 
 system = (InternalDistributedSystem)DistributedSystem.connect(config);
 DistributionManager dm = (DistributionManager)system.getDistributionManager();
 InternalDistributedMember idm = dm.getDistributionManagerId();
 system.disconnect();
 assertTrue(unicastPort <= idm.getPort() && idm.getPort() <= unicastPort+2);
 assertTrue(unicastPort <= idm.getPort() && idm.getDirectChannelPort() <= unicastPort+2);
}
origin: io.snappydata/gemfire-hydra-tests

public void testMembershipPortRangeWithExactThreeValues() throws Exception {
 Properties config = new Properties();
 int mcastPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
 config.setProperty("mcast-port", String.valueOf(mcastPort));
 config.setProperty("locators", "");
 config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, ""
   + (DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[1] - 2) + "-"
   + (DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[1]));
 system = (InternalDistributedSystem)DistributedSystem.connect(config);
 Cache cache = CacheFactory.create(system);
 cache.addCacheServer();
 DistributionManager dm = (DistributionManager) system.getDistributionManager();
 InternalDistributedMember idm = dm.getDistributionManagerId();
 system.disconnect();
 assertTrue(idm.getPort() <= DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[1]);
 assertTrue(idm.getPort() >= DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[0]);
 assertTrue(idm.getDirectChannelPort() <= DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[1]);
 assertTrue(idm.getDirectChannelPort() >= DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[0]);
}
origin: org.apache.geode/gemfire-core

InetSocketAddress addr = new InetSocketAddress(remoteAddr.getInetAddress(), remoteAddr.getDirectChannelPort());
if (useNIO()) {
 SocketChannel channel = SocketChannel.open();
  this.socket = SocketCreator.getDefaultInstance().connectForServer( remoteAddr.getInetAddress(), remoteAddr.getDirectChannelPort(), socketBufferSize );
origin: org.apache.geode/gemfire-core

/**
 * waits until we've joined the distributed system
 * before returning
 */
private void waitForAddressCompletion() {
 InternalDistributedMember myAddr = this.owner.getConduit().getLocalAddress();
 synchronized (myAddr) {
  while ((owner.getConduit().getCancelCriterion().cancelInProgress() == null)
    && myAddr.getInetAddress() == null && myAddr.getVmViewId() < 0) {
   try {
    myAddr.wait(100); // spurious wakeup ok
   }
   catch (InterruptedException ie) {
    Thread.currentThread().interrupt();
    this.owner.getConduit().getCancelCriterion().checkCancelInProgress(ie);
   }
  }
  Assert.assertTrue(myAddr.getDirectChannelPort() == this.owner.getConduit().getPort());
 }
}
origin: io.snappydata/gemfire-core

Assert.assertTrue(myAddr.getDirectChannelPort() == this.owner.getConduit().getPort());
origin: io.snappydata/gemfire-core

Stub stub = new Stub(remote.getIpAddress()/*fix for bug 33615*/, remote.getDirectChannelPort(), remote.getVmViewId());
setRemoteAddr(remote, stub);
this.sharedResource = dis.readBoolean();
origin: io.snappydata/gemfire-core

Stub stub = new Stub(remote.getIpAddress()/*fix for bug 33615*/, remote.getDirectChannelPort(), remote.getVmViewId());
setRemoteAddr(remote, stub);
Thread.currentThread().setName(LocalizedStrings.Connection_P2P_MESSAGE_READER_FOR_0.toLocalizedString(this.remoteAddr));
origin: io.snappydata/gemfire-core

  DSFIDFactory.readInternalDistributedMember(input);
Stub stub = new Stub(remote.getIpAddress() /* fix for bug 33615 */,
  remote.getDirectChannelPort(), remote.getVmViewId());
setRemoteAddr(remote, stub);
this.sharedResource = input.readBoolean();
com.gemstone.gemfire.distributed.internal.membershipInternalDistributedMembergetDirectChannelPort

Javadoc

Returns the port on which the direct channel runs

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,
  • 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 Sublime Text plugins
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