Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

package org.apache.geode.annotations.internal;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Indicates a field is only defined to retain backwards compatibility with previous releases.
* The field should not be used.
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.SOURCE)
public @interface SerializableCompatibility {

/** Optional description */
String value() default "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,18 @@
public class DistributionLocatorId implements java.io.Serializable {
private static final long serialVersionUID = 6587390186971937865L;

private final InetAddress host;
private InetAddress host;
private final int port;
private final @NotNull String bindAddress;
/**
* Serialization: Since this is {@code transient} it must be initialized after deserialization,
* thus it can't be {@code final}.
*/
private transient @NotNull SSLConfig sslConfig;
private final String hostnameForClients;
private final String bindAddress;
private transient SSLConfig sslConfig;
// the following two fields are not used but are retained for backward compatibility
// as this class is Serializable and is used in WAN locator information exchange
private final boolean peerLocator = true;
private final boolean serverLocator = true;
private String hostnameForClients;
private String hostname;
/**
* Serialization: Not include in some older versions and may be {@code null} abd must be
* initialized after deserialization, thus it can't be {@code final}.
*/
private @NotNull String memberName;
// added due to improvement for cloud native environment
private String membername;
private final long timestamp;

/**
Expand Down Expand Up @@ -107,7 +104,7 @@ private DistributionLocatorId(final @Nullable InetAddress host, @Nullable String
this.bindAddress = bindAddressOrDefault(bindAddress);
this.sslConfig = sslConfigOrDefault(sslConfig);
this.hostnameForClients = hostnameForClients;
this.memberName = memberNameOrDefault(memberName);
this.membername = memberNameOrDefault(memberName);
timestamp = System.currentTimeMillis();
}

Expand Down Expand Up @@ -300,7 +297,7 @@ public boolean isMcastId() {
}

public @NotNull String getMemberName() {
return memberName;
return membername;
}

public long getTimeStamp() {
Expand All @@ -316,7 +313,7 @@ public String toString() {
", sslConfig=" + sslConfig +
", hostnameForClients='" + hostnameForClients + '\'' +
", hostname='" + hostname + '\'' +
", memberName='" + memberName + '\'' +
", memberName='" + membername + '\'' +
", timestamp=" + timestamp +
'}';
}
Expand Down Expand Up @@ -377,7 +374,7 @@ private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOE
in.defaultReadObject();

sslConfig = sslConfigOrDefault(null);
memberName = memberNameOrDefault(memberName);
membername = memberNameOrDefault(membername);
}

private static @NotNull String bindAddressOrDefault(final @Nullable String bindAddress) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ org/apache/geode/internal/SystemAdmin$CombinedResources,false
org/apache/geode/internal/admin/CompoundEntrySnapshot,true,5776382582897895718,allUserAttributes:java/util/Set,allValues:java/util/Set,hitRatio:float,hitRatioSum:double,hitResponders:long,lastAccessTime:long,lastModifiedTime:long,name:java/lang/Object,numHits:long,numMisses:long
org/apache/geode/internal/admin/CompoundRegionSnapshot,true,6295026394298398004,allCacheLoaders:java/util/Set,allCacheWriters:java/util/Set,allCapControllers:java/util/Set,allConcLevels:java/util/Set,allCustomIdle:java/util/HashSet,allCustomTtl:java/util/HashSet,allDataPolicies:java/util/Set,allEntryIdleTimeout:java/util/Set,allEntryTtl:java/util/Set,allInitialCaps:java/util/Set,allKeyConstraints:java/util/Set,allListeners:java/util/Set,allLoadFactors:java/util/Set,allRegionIdleTimeout:java/util/Set,allRegionTtl:java/util/Set,allScopes:java/util/Set,allStatsEnabled:java/util/Set,allUserAttributes:java/util/Set,allValueConstraints:java/util/Set,hitRatio:float,hitRatioSum:double,hitResponders:long,lastAccessTime:long,lastModifiedTime:long,name:java/lang/String,numHits:long,numMisses:long
org/apache/geode/internal/admin/StatAlert,true,5725457607122449170,definitionId:int,time:java/util/Date,values:java/lang/Number[]
org/apache/geode/internal/admin/remote/DistributionLocatorId,true,6587390186971937865,bindAddress:java/lang/String,host:java/net/InetAddress,hostname:java/lang/String,hostnameForClients:java/lang/String,memberName:java/lang/String,port:int,timestamp:long
org/apache/geode/internal/admin/remote/DistributionLocatorId,true,6587390186971937865,bindAddress:java/lang/String,host:java/net/InetAddress,hostname:java/lang/String,hostnameForClients:java/lang/String,memberName:java/lang/String,peerLocator:boolean,port:int,serverLocator:boolean,timestamp:long
org/apache/geode/internal/admin/remote/EntryValueNodeImpl,false,fields:org/apache/geode/internal/admin/remote/EntryValueNodeImpl[],name:java/lang/String,primitive:boolean,primitiveVal:java/lang/Object,type:java/lang/String
org/apache/geode/internal/cache/BucketAdvisor$SetFromMap,true,2454657854757543876,m:java/util/Map
org/apache/geode/internal/cache/BucketNotFoundException,true,2898657229184289911
Expand Down