blob: 70e6d9ce8f51c346a1ac048cb3ad96443c90bfce [file] [log] [blame]
/*
* 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.cassandra.gms;
/**
* The various "states" exchanged through Gossip.
*
* <p><b>Important Note:</b> Gossip uses the ordinal of this enum in the messages it exchanges, so values in that enum
* should <i>not</i> be re-ordered or removed. The end of this enum should also always include some "padding" so that
* if newer versions add new states, old nodes that don't know about those new states don't "break" deserializing those
* states.
*/
public enum ApplicationState
{
STATUS,
LOAD,
SCHEMA,
DC,
RACK,
RELEASE_VERSION,
REMOVAL_COORDINATOR,
INTERNAL_IP,
RPC_ADDRESS,
X_11_PADDING, // padding specifically for 1.1
SEVERITY,
NET_VERSION,
HOST_ID,
TOKENS,
RPC_READY,
// We added SSTABLE_VERSIONS in CASSANDRA-15897 in 3.0, and at the time, 3 more ApplicationState had been added
// to newer versions, so we skipped the first 3 of our original padding to ensure SSTABLE_VERSIONS can preserve
// its ordinal accross versions.
X1,
X2,
X3,
/**
* The set of sstable versions on this node. This will usually be only the "current" sstable format (the one with
* which new sstables are written), but may contain more on newly upgraded nodes before `upgradesstable` has been
* run.
*
* <p>The value (a set of sstable {@link org.apache.cassandra.io.sstable.format.VersionAndType}) is serialized as
* a comma-separated list.
**/
SSTABLE_VERSIONS,
// pad to allow adding new states to existing cluster
X5,
X6,
X7,
X8,
X9,
X10,
}