@Override public boolean isClientInterested(ClientProxyMembershipID clientId) { return Acceptor.VERSION.compareTo(Version.GFE_70) >= 0; }
@Override public boolean isClientInterested(ClientProxyMembershipID clientId) { return AcceptorImpl.VERSION.compareTo(Version.GFE_61) >= 0; }
@Override // DM method public void removeMembersWithSameOrNewerVersion(Collection<InternalDistributedMember> members, Version version) { for (Iterator<InternalDistributedMember> it = members.iterator(); it.hasNext(); ) { InternalDistributedMember id = it.next(); if (id.getVersionObject().compareTo(version) >= 0) { it.remove(); } } }
private static boolean sendCqResultsWithKey(ServerConnection servConn) { Version clientVersion = servConn.getClientVersion(); if (clientVersion.compareTo(Version.GFE_65) >= 0) { return true; } return false; }
@Override // DM method public void removeMembersWithSameOrNewerVersion(Collection<InternalDistributedMember> members, Version version) { for (Iterator<InternalDistributedMember> it = members.iterator(); it.hasNext(); ) { InternalDistributedMember id = it.next(); if (id.getVersionObject().compareTo(version) >= 0) { it.remove(); } } }
/** * Determines whether keys for destroyed entries (tombstones) should be sent * to clients in register-interest results. * * @param servConn * @param policy * @return true if tombstones should be sent to the client */ private static boolean sendTombstonesInRIResults(ServerConnection servConn, InterestResultPolicy policy) { return (policy == InterestResultPolicy.KEYS_VALUES) && (servConn.getClientVersion().compareTo(Version.GFE_80) >= 0); }
@Override // DM method public void retainMembersWithSameOrNewerVersion(Collection<InternalDistributedMember> members, Version version) { for (Iterator<InternalDistributedMember> it = members.iterator(); it.hasNext(); ) { InternalDistributedMember id = it.next(); if (id.getVersionObject().compareTo(version) < 0) { it.remove(); } } }
boolean isUpgradeVersionOnly() { return this.upgradeVersionOnly && Version.GFE_70.compareTo(this.getRecoveredGFVersion()) > 0; }
@Override // DM method public void retainMembersWithSameOrNewerVersion(Collection<InternalDistributedMember> members, Version version) { for (Iterator<InternalDistributedMember> it = members.iterator(); it.hasNext(); ) { InternalDistributedMember id = it.next(); if (id.getVersionObject().compareTo(version) < 0) { it.remove(); } } }
public Message getMessage(CacheClientProxy proxy, boolean notify) throws IOException { Version clientVersion = proxy.getVersion(); Message message = null; if (clientVersion.compareTo(Version.GFE_57) >= 0) { message = getGFEMessage(); } else { throw new IOException( "Unsupported client version for server-to-client message creation: " + clientVersion); } return message; }
public Message getMessage(CacheClientProxy proxy, boolean notify) throws IOException { Version clientVersion = proxy.getVersion(); Message message = null; if (clientVersion.compareTo(Version.GFE_57) >= 0) { message = getGFEMessage(); } else { throw new IOException( "Unsupported client version for server-to-client message creation: " + clientVersion); } return message; }
public Message getMessage(CacheClientProxy proxy, boolean notify) throws IOException { Version clientVersion = proxy.getVersion(); Message message = null; if (clientVersion.compareTo(Version.GFE_6622) >= 0) { message = getGFEMessage(); } else { throw new IOException( "Unsupported client version for server-to-client message creation: " + clientVersion); } return message; }
private PersistentMemberID bytesToPMID(byte[] bytes, Version gfversion) throws IOException, ClassNotFoundException { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); DataInputStream dis = new DataInputStream(bais); PersistentMemberID result = new PersistentMemberID(); if (Version.GFE_70.compareTo(gfversion) > 0) { result.fromData662(dis); } else { InternalDataSerializer.invokeFromData(result, dis); } return result; }
public void setLastChunkAndNumParts(boolean lastChunk, int numParts) { setLastChunk(lastChunk); if (this.sc != null && this.sc.getClientVersion().compareTo(Version.GFE_65) >= 0) { //we us e three bits for number of parts in last chunk byte //we us e three bits for number of parts in last chunk byte byte localLastChunk = (byte)(numParts << 5); this.lastChunk |= localLastChunk; } }
/** * checks to see if this thread needs to masquerade as a transactional thread. * clients after GFE_66 should be able to start a transaction. * @param msg * @param servConn * @return true if thread should masquerade as a transactional thread. */ protected boolean shouldMasqueradeForTx(Message msg, ServerConnection servConn) { if (servConn.getClientVersion().compareTo(Version.GFE_66) >= 0 && msg.getTransactionId() > TXManagerImpl.NOTX) { return true; } return false; }
/** * Finds the Version instance corresponding to the given ordinal and returns * the result of compareTo(Version) * @param other the ordinal of the other Version object * @return negative if this version is older, positive if this version is newer, 0 if this is the same version */ public final int compareTo(short other) { // first try to find the actual Version object Version v = fromOrdinalNoThrow(other, false); if (v == null) { // failing that we use the old method of comparing Versions: return this.ordinal() - other; } return compareTo(v); }
@Override protected Message getMessage(CacheClientProxy proxy, byte[] latestValue) throws IOException { Version clientVersion = proxy.getVersion(); Message message = null; if (clientVersion.compareTo(Version.GFE_57) >= 0) { message = getGFEMessage(proxy.getProxyID(), null, clientVersion); } else { throw new IOException( "Unsupported client version for server-to-client message creation: " + clientVersion); } return message; }
@Override protected Message getMessage(CacheClientProxy proxy, byte[] latestValue) throws IOException { if (Version.GFE_70.compareTo(proxy.getVersion()) <= 0) { return getGFE70Message(proxy.getVersion()); } else { return null; } }
@Override public void toData(DataOutput out) throws IOException { super.toData(out); out.writeByte(this.clearOp.ordinal()); DataSerializer.writeObject(this.eventID, out); DataSerializer.writeObject(this.rvv, out); if (InternalDataSerializer.getVersionForDataStream(out).compareTo(Version.GFE_80) >= 0) { DataSerializer.writeObject(this.operationTag, out); } }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.clearOp = OperationType.values()[in.readByte()]; this.eventID = (EventID)DataSerializer.readObject(in); this.rvv = (RegionVersionVector)DataSerializer.readObject(in); if (InternalDataSerializer.getVersionForDataStream(in).compareTo(Version.GFE_80) >= 0) { this.operationTag = (VersionTag<?>)DataSerializer.readObject(in); } }