com.gemstone.gemfire.internal.shared.Version.ordinal()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中com.gemstone.gemfire.internal.shared.Version.ordinal()方法的一些代码示例,展示了Version.ordinal()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.ordinal()方法的具体详情如下:
包路径:com.gemstone.gemfire.internal.shared.Version
类名称:Version
方法名:ordinal

Version.ordinal介绍

暂无

代码示例

代码示例来源:origin: io.snappydata/gemfire-core

/**
 * Constructs a DSFIDNotFoundException object with message string.
 * 
 * @param msg
 *          exception message
 */
public DSFIDNotFoundException(String msg, int dsfid) {
 super(msg);
 this.dsfid = dsfid;
 this.versionOrdinal = Version.CURRENT.ordinal();
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override
public short getMulticastVersionOrdinal() {
 return Version.GFE_71.ordinal();
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override // DM method
public void removeMembersWithSameOrNewerVersion(Collection<InternalDistributedMember> members, Version version) {
 short ordinal = version.ordinal();
 for (Iterator<InternalDistributedMember> it = members.iterator(); it.hasNext(); ) {
  InternalDistributedMember id = it.next();
  if (id.getVersionOrdinal() >= ordinal) {
   it.remove();
  }
 }
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override // DM method
public void retainMembersWithSameOrNewerVersion(Collection<InternalDistributedMember> members, Version version) {
 short ordinal = version.ordinal();
 for (Iterator<InternalDistributedMember> it = members.iterator(); it.hasNext(); ) {
  InternalDistributedMember id = it.next();
  if (id.getVersionOrdinal() < ordinal) {
   it.remove();
  }
 }
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override // DM method
public void removeMembersWithSameOrNewerVersion(Collection<InternalDistributedMember> members, Version version) {
 short ordinal = version.ordinal();
 for (Iterator<InternalDistributedMember> it = members.iterator(); it.hasNext(); ) {
  InternalDistributedMember id = it.next();
  if (id.getVersionOrdinal() >= ordinal) {
   it.remove();
  }
 }
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override
public short getSerializationVersionOrdinal(short version) {
 return Version.fromOrdinalOrCurrent(version).ordinal();
}

代码示例来源:origin: io.snappydata/gemfire-junit

public VersionedIpAddress(String host, int port, Version v) {
 super(host, port);
 setVersionOrdinal(v.ordinal());
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override // DM method
public void retainMembersWithSameOrNewerVersion(Collection<InternalDistributedMember> members, Version version) {
 short ordinal = version.ordinal();
 for (Iterator<InternalDistributedMember> it = members.iterator(); it.hasNext(); ) {
  InternalDistributedMember id = it.next();
  if (id.getVersionOrdinal() < ordinal) {
   it.remove();
  }
 }
}

代码示例来源:origin: io.snappydata/gemfire-hydra-tests

public static void setHandshakeVersionForTesting() throws Exception {
 HandShake.setVersionForTesting(Version.TEST_VERSION.ordinal());
}

代码示例来源:origin: io.snappydata/gemfire-hydra-tests

public static void unsetHandshakeVersionForTesting() throws Exception {
 HandShake.setVersionForTesting(ConnectionProxy.VERSION.ordinal());
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override
public boolean isVersionForStreamAtLeast(DataOutput stream, short version) {
 return InternalDataSerializer.getVersionForDataStream(stream).ordinal() >= version;
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override
public boolean isVersionForStreamAtLeast(DataInput stream, short version) {
 return InternalDataSerializer.getVersionForDataStream(stream).ordinal() >= version;
}

代码示例来源:origin: io.snappydata/gemfire-hydra-tests

public static void setHandshakeVersionForTesting() throws Exception {
 HandShake.setVersionForTesting(Version.TEST_VERSION.ordinal());
}

代码示例来源:origin: io.snappydata/gemfire-core

public int getNumberOfClientsAtVersion(Version version) {
 return numOfClientsPerVersion.get(version.ordinal());
}

代码示例来源:origin: io.snappydata/gemfire-hydra-tests

public static void unsetHandshakeVersionForTesting() throws Exception {
 HandShake.setVersionForTesting(ConnectionProxy.VERSION.ordinal());
}

代码示例来源:origin: io.snappydata/gemfire-core

public int getNumberOfClientsAtOrAboveVersion(Version version) {
 int number = 0;
 for (int i = version.ordinal(); i < numOfClientsPerVersion.length(); i++) {
  number += numOfClientsPerVersion.get(i);
 }
 return number;
}

代码示例来源:origin: io.snappydata/gemfire-core

private void writeProductVersionRecord(Version version, OplogFile olf)
  throws IOException {
 this.opState.initialize(version.ordinal());
 writeOpLogBytes(olf, false, true);
 olf.currSize += getOpStateSize();
 this.dirHolder.incrementTotalOplogSize(getOpStateSize());
}

代码示例来源:origin: io.snappydata/gemfirexd

@Override
 public void fromData(DataInput in) throws IOException,
   ClassNotFoundException {
  fromDataBase(in);
  if (isAlterTableDropFKConstraint() || isAlterTableAddFKConstraint()) {
   this.constraintName = DataSerializer.readString(in);
  }
  this.ddlVersion = in.readShort();
  if (this.ddlVersion >= Version.GFXD_1302.ordinal()) {
   ResolverUtils.setUseGFXD1302Hashing(true);
  }
  else {
   checkAndSetPre1302HashingForTables();
  }
 }
}

代码示例来源:origin: io.snappydata/gemfire-core

private void doHandshake() {
 //hitesh:to create new connection handshake
 if (verifyClientConnection()) {
  // Initialize the commands after the handshake so that the version
  // can be used.
  initializeCommands();
  initializeClientUserAuths();
 }
 if (TEST_VERSION_AFTER_HANDSHAKE_FLAG) {
  Assert.assertTrue((this.handshake.getVersion().ordinal() == testVersionAfterHandshake), "Found different version after handshake");
  TEST_VERSION_AFTER_HANDSHAKE_FLAG = false;
 }  
}

代码示例来源:origin: io.snappydata/gemfire-core

public static Object executeOn(Connection con, ExecutablePool pool)
{
 AbstractOp op = null;
 //System.out.println("Version: "+con.getWanSiteVersion());
 // [sumedh] both cases are now same; why switch-case?
 if (con.getWanSiteVersion() <= Version.GFE_651.ordinal()) {
  op = new GatewaySenderGFEBatchOpImpl(pool.getLoggerI18n());
 } else {
  // Default should create a batch of server version (ACCEPTOR.VERSION)
  op = new GatewaySenderGFEBatchOpImpl(pool.getLoggerI18n());
 }
 return pool.executeOn(con, op, true/*timeoutFatal*/);
}

相关文章