mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-20 04:35:32 +00:00
bug5741: backward compatibility for replication protocol, protocol versioning for new protocol
This commit is contained in:
@@ -72,6 +72,8 @@ import com.sap.sse.util.ThreadLocalTransporter;
|
||||
* {@code REPLICATE_ON_START} variable has its default value defined.</li>
|
||||
* </ul>
|
||||
*
|
||||
* The {@link #getId() ID} must be different from {@link ReplicationReceiver#VERSION_INDICATOR}.<p>
|
||||
*
|
||||
* @param <S>
|
||||
* the type of state to which the operations are applied; usually this will be set to the implementing
|
||||
* subclass
|
||||
|
||||
+6
@@ -3,6 +3,12 @@ package com.sap.sse.replication;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ReplicationReceiver {
|
||||
/**
|
||||
* A string that is sent for new replication protocol versions instead of the stringified {@link Replicable} ID.
|
||||
* That replicable ID is usually a fully-qualified class name. It must not be equal to this version indicator string
|
||||
* which has the value {@code "***"}.
|
||||
*/
|
||||
static String VERSION_INDICATOR = "***";
|
||||
|
||||
/**
|
||||
* If the replicator is suspended, messages received are queued.
|
||||
|
||||
+4
-1
@@ -15,6 +15,7 @@ import com.sap.sse.replication.OperationsToMasterSender;
|
||||
import com.sap.sse.replication.OperationsToMasterSendingQueue;
|
||||
import com.sap.sse.replication.ReplicableWithObjectInputStream;
|
||||
import com.sap.sse.replication.ReplicationMasterDescriptor;
|
||||
import com.sap.sse.replication.ReplicationReceiver;
|
||||
import com.sap.sse.replication.ReplicationService;
|
||||
import com.sap.sse.util.ClearStateTestSupport;
|
||||
import com.sap.sse.util.ObjectInputStreamResolvingAgainstCache;
|
||||
@@ -92,7 +93,9 @@ public abstract class AbstractReplicableWithObjectInputStream<S, O extends Opera
|
||||
|
||||
@Override
|
||||
public Serializable getId() {
|
||||
return getClass().getName();
|
||||
final String result = getClass().getName();
|
||||
assert !result.equals(ReplicationReceiver.VERSION_INDICATOR);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user