Class SSTablesGlobalTracker

java.lang.Object
org.apache.cassandra.service.SSTablesGlobalTracker
All Implemented Interfaces:
INotificationConsumer

public class SSTablesGlobalTracker extends Object implements INotificationConsumer
Tracks all sstables in use on the local node.

Each table tracks its own SSTables in ColumnFamilyStore (through Tracker) for most purposes, but this class groups information we need on all the sstables the node has.

  • Constructor Details

    • SSTablesGlobalTracker

      public SSTablesGlobalTracker(SSTableFormat<?,?> currentSSTableFormat)
  • Method Details

    • versionsInUse

      public Set<Version> versionsInUse()
      The set of all sstable versions currently in use on this node.
    • register

      public boolean register(INotificationConsumer subscriber)
      Register a new subscriber to this tracker. Registered subscribers are currently notified when the set of sstable versions in use changes, using a SSTablesVersionsInUseChangeNotification.
      Parameters:
      subscriber - the new subscriber to register. If this subscriber is already registered, this method does nothing (meaning that even if a subscriber is registered multiple times, it will only be notified once on every change).
      Returns:
      whether the subscriber was register (so whether it was not already registered).
    • unregister

      public boolean unregister(INotificationConsumer subscriber)
      Unregister a subscriber from this tracker.
      Parameters:
      subscriber - the subscriber to unregister. If this subscriber is not registered, this method does nothing.
      Returns:
      whether the subscriber was unregistered (so whether it was registered subscriber of this tracker).
    • handleNotification

      public void handleNotification(INotification notification, Object sender)
      Specified by:
      handleNotification in interface INotificationConsumer