use of org.apache.cassandra.notifications.SSTableMetadataChanged in project cassandra by apache.
the class CompactionStrategyManager method handleNotification.
public void handleNotification(INotification notification, Object sender) {
// we might race with reload adding/removing the sstables, this means that compaction strategies
// must handle double notifications.
maybeReloadDiskBoundaries();
readLock.lock();
try {
if (notification instanceof SSTableAddedNotification) {
SSTableAddedNotification flushedNotification = (SSTableAddedNotification) notification;
handleFlushNotification(flushedNotification.added);
} else if (notification instanceof SSTableListChangedNotification) {
SSTableListChangedNotification listChangedNotification = (SSTableListChangedNotification) notification;
handleListChangedNotification(listChangedNotification.added, listChangedNotification.removed);
} else if (notification instanceof SSTableRepairStatusChanged) {
handleRepairStatusChangedNotification(((SSTableRepairStatusChanged) notification).sstables);
} else if (notification instanceof SSTableDeletingNotification) {
handleDeletingNotification(((SSTableDeletingNotification) notification).deleting);
} else if (notification instanceof SSTableMetadataChanged) {
SSTableMetadataChanged lcNotification = (SSTableMetadataChanged) notification;
handleMetadataChangedNotification(lcNotification.sstable, lcNotification.oldMetadata);
}
} finally {
readLock.unlock();
}
}
Aggregations