private void checkMemberListVersion(int memberListVersion) { // RU_COMPAT_V3_10 if (clusterVersion.isGreaterOrEqual(Versions.V3_11)) { int thisMemberListVersion = node.getClusterService().getMemberListVersion(); if (memberListVersion != thisMemberListVersion) { throw new IllegalStateException( "Can not lock cluster state! Member list versions are not matching!" + " Expected version: " + memberListVersion + ", Current version: " + thisMemberListVersion); } } }
private boolean mustReadMapIndexInfos(Version version) { // 3.10 OS always reads mapIndexInfos // 3.10 EE always read mapIndexInfos when cluster version >= 3.10 // When cluster version is 3.9: // - an object input from 3.9 EE does not contain mapIndexInfo and arrives with UNKNOWN version // - an object input from 3.10 EE comes with version 3.9 and contains mapIndexInfo return !getBuildInfo().isEnterprise() || version.isGreaterOrEqual(V3_10); }
@Override public void run() { Version clusterVersion = nodeEngine.getClusterService().getClusterVersion(); // RU_COMPAT_3_11 if (clusterVersion.isGreaterOrEqual(Versions.V3_12)) { publishCompletedMigrations(); } } }
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); // RU_COMPAT_3_10 if (in.getVersion().isGreaterOrEqual(Versions.V3_11)) { disableWanReplicationEvent = in.readBoolean(); } } }
private boolean mustReadMemberListJoinVersion(VersionAware versionAware) { return (!getBuildInfo().isEnterprise() || versionAware.getVersion().isGreaterOrEqual(V3_10)); } }
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); // RU_COMPAT_3_10 if (in.getVersion().isGreaterOrEqual(Versions.V3_11)) { disableWanReplicationEvent = in.readBoolean(); } } }
@Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); // RU_COMPAT_3_10 if (out.getVersion().isGreaterOrEqual(Versions.V3_11)) { out.writeBoolean(disableWanReplicationEvent); } }
@Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); // RU_COMPAT_3_10 if (out.getVersion().isGreaterOrEqual(Versions.V3_11)) { out.writeBoolean(disableWanReplicationEvent); } }
@Override public void writeData(ObjectDataOutput out) throws IOException { super.writeData(out); out.writeData(value); if (out.getVersion().isGreaterOrEqual(EXPIRY_POLICY_VERSION)) { out.writeData(expiryPolicy); } }
@Override public void readData(ObjectDataInput in) throws IOException { super.readData(in); value = in.readData(); if (in.getVersion().isGreaterOrEqual(EXPIRY_POLICY_VERSION)) { expiryPolicy = in.readData(); } }
@Override public void writeData(ObjectDataOutput out) throws IOException { super.writeData(out); out.writeObject(value); if (out.getVersion().isGreaterOrEqual(EXPIRY_POLICY_VERSION)) { out.writeObject(expiryPolicy); } }
@Override public void readData(ObjectDataInput in) throws IOException { super.readData(in); value = in.readObject(); if (in.getVersion().isGreaterOrEqual(EXPIRY_POLICY_VERSION)) { expiryPolicy = in.readObject(); } }
private boolean canPublishLoadEvent() { // RU_COMPAT_3_10 NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); ClusterService clusterService = nodeEngine.getClusterService(); boolean version311OrLater = clusterService.getClusterVersion().isGreaterOrEqual(Versions.V3_11); boolean addEventPublishingEnabled = mapContainer.isAddEventPublishingEnabled(); return version311OrLater && !addEventPublishingEnabled; }
private boolean canPublishLoadEvent() { // RU_COMPAT_3_10 NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); ClusterService clusterService = nodeEngine.getClusterService(); boolean version311OrLater = clusterService.getClusterVersion().isGreaterOrEqual(Versions.V3_11); boolean addEventPublishingEnabled = mapContainer.isAddEventPublishingEnabled(); return version311OrLater && !addEventPublishingEnabled; }
@Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); entries.writeData(out); for (RecordInfo recordInfo : recordInfos) { recordInfo.writeData(out); } // RU_COMPAT_3_10 if (out.getVersion().isGreaterOrEqual(Versions.V3_11)) { out.writeBoolean(disableWanReplicationEvent); } }
@Override public void readData(ObjectDataInput in) throws IOException { name = in.readUTF(); poolSize = in.readInt(); queueCapacity = in.readInt(); statisticsEnabled = in.readBoolean(); // RU_COMPAT_3_9 if (in.getVersion().isGreaterOrEqual(Versions.V3_10)) { quorumName = in.readUTF(); } }
@Override public void writeData(ObjectDataOutput out) throws IOException { out.writeObject(value); out.writeLong(expirationTime); out.writeLong(creationTime); out.writeLong(lastAccessTime); out.writeLong(accessHit); if (out.getVersion().isGreaterOrEqual(EXPIRY_POLICY_VERSION)) { out.writeObject(expiryPolicy); } }
@Override public void writeData(ObjectDataOutput out) throws IOException { out.writeUTF(name); out.writeInt(durability); out.writeInt(capacity); out.writeInt(poolSize); // RU_COMPAT_3_9 if (out.getVersion().isGreaterOrEqual(Versions.V3_10)) { out.writeUTF(quorumName); out.writeObject(mergePolicyConfig); } }
@Override protected void writeInternal(ObjectDataOutput out) throws IOException { out.writeUTF(name); out.writeData(dataKey); out.writeLong(threadId); out.writeData(dataValue); out.writeLong(ttl); //RU_COMPAT_3_10 if (out.getVersion().isGreaterOrEqual(V3_11)) { out.writeLong(maxIdle); } }
@Override public void writeData(ObjectDataOutput out) throws IOException { out.writeObject(value); out.writeLong(expirationTime); out.writeLong(creationTime); out.writeLong(lastAccessTime); out.writeLong(accessHit); if (out.getVersion().isGreaterOrEqual(EXPIRY_POLICY_VERSION)) { out.writeObject(expiryPolicy); } }