public class MigrationManager extends java.lang.Object implements IEndpointStateChangeSubscriber
Modifier and Type | Class and Description |
---|---|
static class |
MigrationManager.MigrationsSerializer |
Modifier and Type | Field and Description |
---|---|
static MigrationManager |
instance |
static int |
MIGRATION_DELAY_IN_MS |
Modifier and Type | Method and Description |
---|---|
static void |
announceColumnFamilyDrop(java.lang.String ksName,
java.lang.String cfName) |
static void |
announceColumnFamilyUpdate(CFMetaData cfm,
boolean fromThrift) |
static void |
announceKeyspaceDrop(java.lang.String ksName) |
static void |
announceKeyspaceUpdate(KSMetaData ksm) |
static void |
announceNewColumnFamily(CFMetaData cfm) |
static void |
announceNewKeyspace(KSMetaData ksm) |
static void |
announceNewKeyspace(KSMetaData ksm,
long timestamp) |
static boolean |
isReadyForBootstrap() |
void |
notifyCreateColumnFamily(CFMetaData cfm) |
void |
notifyCreateKeyspace(KSMetaData ksm) |
void |
notifyDropColumnFamily(CFMetaData cfm) |
void |
notifyDropKeyspace(KSMetaData ksm) |
void |
notifyUpdateColumnFamily(CFMetaData cfm) |
void |
notifyUpdateKeyspace(KSMetaData ksm) |
void |
onAlive(java.net.InetAddress endpoint,
EndpointState state) |
void |
onChange(java.net.InetAddress endpoint,
ApplicationState state,
VersionedValue value) |
void |
onDead(java.net.InetAddress endpoint,
EndpointState state) |
void |
onJoin(java.net.InetAddress endpoint,
EndpointState epState)
Use to inform interested parties about the change in the state
for specified endpoint
|
void |
onRemove(java.net.InetAddress endpoint) |
void |
onRestart(java.net.InetAddress endpoint,
EndpointState state)
Called whenever a node is restarted.
|
static void |
passiveAnnounce(java.util.UUID version)
Announce my version passively over gossip.
|
void |
register(IMigrationListener listener) |
static void |
resetLocalSchema()
Clear all locally stored schema information and reset schema to initial state.
|
void |
unregister(IMigrationListener listener) |
public static final MigrationManager instance
public static final int MIGRATION_DELAY_IN_MS
public void register(IMigrationListener listener)
public void unregister(IMigrationListener listener)
public void onJoin(java.net.InetAddress endpoint, EndpointState epState)
IEndpointStateChangeSubscriber
onJoin
in interface IEndpointStateChangeSubscriber
endpoint
- endpoint for which the state change occurred.epState
- state that actually changed for the above endpoint.public void onChange(java.net.InetAddress endpoint, ApplicationState state, VersionedValue value)
onChange
in interface IEndpointStateChangeSubscriber
public void onAlive(java.net.InetAddress endpoint, EndpointState state)
onAlive
in interface IEndpointStateChangeSubscriber
public void onDead(java.net.InetAddress endpoint, EndpointState state)
onDead
in interface IEndpointStateChangeSubscriber
public void onRestart(java.net.InetAddress endpoint, EndpointState state)
IEndpointStateChangeSubscriber
state.isAlive() == false
as state
is from before the restarted node is marked up.onRestart
in interface IEndpointStateChangeSubscriber
public void onRemove(java.net.InetAddress endpoint)
onRemove
in interface IEndpointStateChangeSubscriber
public static boolean isReadyForBootstrap()
public void notifyCreateKeyspace(KSMetaData ksm)
public void notifyCreateColumnFamily(CFMetaData cfm)
public void notifyUpdateKeyspace(KSMetaData ksm)
public void notifyUpdateColumnFamily(CFMetaData cfm)
public void notifyDropKeyspace(KSMetaData ksm)
public void notifyDropColumnFamily(CFMetaData cfm)
public static void announceNewKeyspace(KSMetaData ksm) throws ConfigurationException
ConfigurationException
public static void announceNewKeyspace(KSMetaData ksm, long timestamp) throws ConfigurationException
ConfigurationException
public static void announceNewColumnFamily(CFMetaData cfm) throws ConfigurationException
ConfigurationException
public static void announceKeyspaceUpdate(KSMetaData ksm) throws ConfigurationException
ConfigurationException
public static void announceColumnFamilyUpdate(CFMetaData cfm, boolean fromThrift) throws ConfigurationException
ConfigurationException
public static void announceKeyspaceDrop(java.lang.String ksName) throws ConfigurationException
ConfigurationException
public static void announceColumnFamilyDrop(java.lang.String ksName, java.lang.String cfName) throws ConfigurationException
ConfigurationException
public static void passiveAnnounce(java.util.UUID version)
version
- The schema version to announcepublic static void resetLocalSchema() throws java.io.IOException
java.io.IOException
- if schema tables truncation failsCopyright © 2013 The Apache Software Foundation