org.apache.cassandra.service

## Class MigrationManager

- java.lang.Object
- - org.apache.cassandra.service.MigrationManager

    public class MigrationManager
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`static class` `MigrationManager.MigrationsSerializer`

### Field Summary

Fields
`static MigrationManager` `instance`
`static int` `MIGRATION_DELAY_IN_MS`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static void` `announceAggregateDrop(UDAggregate udf, boolean announceLocally)`
`static void` `announceColumnFamilyDrop(java.lang.String ksName, java.lang.String cfName)`
`static void` `announceColumnFamilyDrop(java.lang.String ksName, java.lang.String cfName, boolean announceLocally)`
`static void` `announceColumnFamilyUpdate(CFMetaData cfm)`
`static void` `announceColumnFamilyUpdate(CFMetaData cfm, boolean announceLocally)`
`static void` `announceColumnFamilyUpdate(CFMetaData cfm, java.util.Collection<ViewDefinition> views, boolean announceLocally)`
`static void` `announceFunctionDrop(UDFunction udf, boolean announceLocally)`
`static void` `announceKeyspaceDrop(java.lang.String ksName)`
`static void` `announceKeyspaceDrop(java.lang.String ksName, boolean announceLocally)`
`static void` `announceKeyspaceUpdate(KeyspaceMetadata ksm)`
`static void` `announceKeyspaceUpdate(KeyspaceMetadata ksm, boolean announceLocally)`
`static void` `announceNewAggregate(UDAggregate udf, boolean announceLocally)`
`static void` `announceNewColumnFamily(CFMetaData cfm)`
`static void` `announceNewColumnFamily(CFMetaData cfm, boolean announceLocally)`
`static void` `announceNewFunction(UDFunction udf, boolean announceLocally)`
`static void` `announceNewKeyspace(KeyspaceMetadata ksm)`
`static void` `announceNewKeyspace(KeyspaceMetadata ksm, boolean announceLocally)`
`static void` `announceNewKeyspace(KeyspaceMetadata ksm, long timestamp, boolean announceLocally)`
`static void` `announceNewType(UserType newType, boolean announceLocally)`
`static void` `announceNewView(ViewDefinition view, boolean announceLocally)`
`static void` `announceTypeDrop(UserType droppedType)`
`static void` `announceTypeDrop(UserType droppedType, boolean announceLocally)`
`static void` `announceTypeUpdate(UserType updatedType, boolean announceLocally)`
`static void` `announceViewDrop(java.lang.String ksName, java.lang.String viewName, boolean announceLocally)`
`static void` `announceViewUpdate(ViewDefinition view, boolean announceLocally)`
`static void` `forceAnnounceNewColumnFamily(CFMetaData cfm)` Announces the table even if the definition is already know locally.
`static boolean` `isReadyForBootstrap()`
`void` `notifyCreateAggregate(UDAggregate udf)`
`void` `notifyCreateColumnFamily(CFMetaData cfm)`
`void` `notifyCreateFunction(UDFunction udf)`
`void` `notifyCreateKeyspace(KeyspaceMetadata ksm)`
`void` `notifyCreateUserType(UserType ut)`
`void` `notifyCreateView(ViewDefinition view)`
`void` `notifyDropAggregate(UDAggregate udf)`
`void` `notifyDropColumnFamily(CFMetaData cfm)`
`void` `notifyDropFunction(UDFunction udf)`
`void` `notifyDropKeyspace(KeyspaceMetadata ksm)`
`void` `notifyDropUserType(UserType ut)`
`void` `notifyDropView(ViewDefinition view)`
`void` `notifyUpdateAggregate(UDAggregate udf)`
`void` `notifyUpdateColumnFamily(CFMetaData cfm, boolean columnsDidChange)`
`void` `notifyUpdateFunction(UDFunction udf)`
`void` `notifyUpdateKeyspace(KeyspaceMetadata ksm)`
`void` `notifyUpdateUserType(UserType ut)`
`void` `notifyUpdateView(ViewDefinition view, boolean columnsDidChange)`
`static void` `passiveAnnounce(java.util.UUID version, boolean compatible)` Announce my version passively over gossip.
`void` `register(MigrationListener listener)`
`static void` `resetLocalSchema()` Clear all locally stored schema information and reset schema to initial state.
`static void` `scheduleSchemaPull(java.net.InetAddress endpoint, EndpointState state)`
`static boolean` `shouldPullSchemaFrom(java.net.InetAddress endpoint)`
`void` `unregister(MigrationListener listener)`
`static void` `waitUntilReadyForBootstrap()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### instance

    public static final MigrationManager instance

#### MIGRATION_DELAY_IN_MS

    public static final int MIGRATION_DELAY_IN_MS

See Also:
  Constant Field Values

### Method Detail

#### register

    public void register(MigrationListener listener)

#### unregister

    public void unregister(MigrationListener listener)

#### scheduleSchemaPull

    public static void scheduleSchemaPull(java.net.InetAddress endpoint,
                                          EndpointState state)

#### shouldPullSchemaFrom

    public static boolean shouldPullSchemaFrom(java.net.InetAddress endpoint)

#### isReadyForBootstrap

    public static boolean isReadyForBootstrap()

#### waitUntilReadyForBootstrap

    public static void waitUntilReadyForBootstrap()

#### notifyCreateKeyspace

    public void notifyCreateKeyspace(KeyspaceMetadata ksm)

#### notifyCreateColumnFamily

    public void notifyCreateColumnFamily(CFMetaData cfm)

#### notifyCreateView

    public void notifyCreateView(ViewDefinition view)

#### notifyCreateUserType

    public void notifyCreateUserType(UserType ut)

#### notifyCreateFunction

    public void notifyCreateFunction(UDFunction udf)

#### notifyCreateAggregate

    public void notifyCreateAggregate(UDAggregate udf)

#### notifyUpdateKeyspace

    public void notifyUpdateKeyspace(KeyspaceMetadata ksm)

#### notifyUpdateColumnFamily

    public void notifyUpdateColumnFamily(CFMetaData cfm,
                                         boolean columnsDidChange)

#### notifyUpdateView

    public void notifyUpdateView(ViewDefinition view,
                                 boolean columnsDidChange)

#### notifyUpdateUserType

    public void notifyUpdateUserType(UserType ut)

#### notifyUpdateFunction

    public void notifyUpdateFunction(UDFunction udf)

#### notifyUpdateAggregate

    public void notifyUpdateAggregate(UDAggregate udf)

#### notifyDropKeyspace

    public void notifyDropKeyspace(KeyspaceMetadata ksm)

#### notifyDropColumnFamily

    public void notifyDropColumnFamily(CFMetaData cfm)

#### notifyDropView

    public void notifyDropView(ViewDefinition view)

#### notifyDropUserType

    public void notifyDropUserType(UserType ut)

#### notifyDropFunction

    public void notifyDropFunction(UDFunction udf)

#### notifyDropAggregate

    public void notifyDropAggregate(UDAggregate udf)

#### announceNewKeyspace

    public static void announceNewKeyspace(KeyspaceMetadata ksm)
                                    throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceNewKeyspace

    public static void announceNewKeyspace(KeyspaceMetadata ksm,
                                           boolean announceLocally)
                                    throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceNewKeyspace

    public static void announceNewKeyspace(KeyspaceMetadata ksm,
                                           long timestamp,
                                           boolean announceLocally)
                                    throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceNewColumnFamily

    public static void announceNewColumnFamily(CFMetaData cfm)
                                        throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceNewColumnFamily

    public static void announceNewColumnFamily(CFMetaData cfm,
                                               boolean announceLocally)
                                        throws ConfigurationException

Throws:
  `ConfigurationException`

#### forceAnnounceNewColumnFamily

    public static void forceAnnounceNewColumnFamily(CFMetaData cfm)
                                             throws ConfigurationException

Announces the table even if the definition is already know locally. This should generally be avoided but is used internally when we want to force the most up to date version of a system table schema (Note that we don't know if the schema we force _is_ the most recent version or not, we just rely on idempotency to basically ignore that announce if it's not. That's why we can't use announceUpdateColumnFamily, it would for instance delete new columns if this is not called with the most up-to-date version) Note that this is only safe for system tables where we know the cfId is fixed and will be the same whatever version of the definition is used.

Throws:
  `ConfigurationException`

#### announceNewView

    public static void announceNewView(ViewDefinition view,
                                       boolean announceLocally)
                                throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceNewType

    public static void announceNewType(UserType newType,
                                       boolean announceLocally)

#### announceNewFunction

    public static void announceNewFunction(UDFunction udf,
                                           boolean announceLocally)

#### announceNewAggregate

    public static void announceNewAggregate(UDAggregate udf,
                                            boolean announceLocally)

#### announceKeyspaceUpdate

    public static void announceKeyspaceUpdate(KeyspaceMetadata ksm)
                                       throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceKeyspaceUpdate

    public static void announceKeyspaceUpdate(KeyspaceMetadata ksm,
                                              boolean announceLocally)
                                       throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceColumnFamilyUpdate

    public static void announceColumnFamilyUpdate(CFMetaData cfm)
                                           throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceColumnFamilyUpdate

    public static void announceColumnFamilyUpdate(CFMetaData cfm,
                                                  boolean announceLocally)
                                           throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceColumnFamilyUpdate

    public static void announceColumnFamilyUpdate(CFMetaData cfm,
                                                  java.util.Collection<ViewDefinition> views,
                                                  boolean announceLocally)
                                           throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceViewUpdate

    public static void announceViewUpdate(ViewDefinition view,
                                          boolean announceLocally)
                                   throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceTypeUpdate

    public static void announceTypeUpdate(UserType updatedType,
                                          boolean announceLocally)

#### announceKeyspaceDrop

    public static void announceKeyspaceDrop(java.lang.String ksName)
                                     throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceKeyspaceDrop

    public static void announceKeyspaceDrop(java.lang.String ksName,
                                            boolean announceLocally)
                                     throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceColumnFamilyDrop

    public static void announceColumnFamilyDrop(java.lang.String ksName,
                                                java.lang.String cfName)
                                         throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceColumnFamilyDrop

    public static void announceColumnFamilyDrop(java.lang.String ksName,
                                                java.lang.String cfName,
                                                boolean announceLocally)
                                         throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceViewDrop

    public static void announceViewDrop(java.lang.String ksName,
                                        java.lang.String viewName,
                                        boolean announceLocally)
                                 throws ConfigurationException

Throws:
  `ConfigurationException`

#### announceTypeDrop

    public static void announceTypeDrop(UserType droppedType)

#### announceTypeDrop

    public static void announceTypeDrop(UserType droppedType,
                                        boolean announceLocally)

#### announceFunctionDrop

    public static void announceFunctionDrop(UDFunction udf,
                                            boolean announceLocally)

#### announceAggregateDrop

    public static void announceAggregateDrop(UDAggregate udf,
                                             boolean announceLocally)

#### passiveAnnounce

    public static void passiveAnnounce(java.util.UUID version,
                                       boolean compatible)

Announce my version passively over gossip. Used to notify nodes as they arrive in the cluster.

Parameters:
  `version` - The schema version to announce
  `compatible` - flag whether `version` is a 3.0 compatible version

#### resetLocalSchema

    public static void resetLocalSchema()

Clear all locally stored schema information and reset schema to initial state. Called by user (via JMX) who wants to get rid of schema disagreement.