Class CompactionInfo
- java.lang.Object
-
- org.apache.cassandra.db.compaction.CompactionInfo
-
public final class CompactionInfo extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompactionInfo.Holder
static class
CompactionInfo.Unit
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COLUMNFAMILY
static java.lang.String
COMPACTION_ID
static java.lang.String
COMPLETED
static java.lang.String
ID
static java.lang.String
KEYSPACE
static java.lang.String
SSTABLES
static java.lang.String
TASK_TYPE
static java.lang.String
TOTAL
static java.lang.String
UNIT
-
Constructor Summary
Constructors Constructor Description CompactionInfo(TableMetadata metadata, OperationType tasktype, long bytesComplete, long totalBytes, java.util.UUID compactionId, java.util.Collection<SSTableReader> sstables)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
asMap()
CompactionInfo
forProgress(long complete, long total)
long
getCompleted()
java.util.Optional<java.lang.String>
getKeyspace()
java.util.Set<SSTableReader>
getSSTables()
java.util.Optional<java.lang.String>
getTable()
TableMetadata
getTableMetadata()
java.util.UUID
getTaskId()
OperationType
getTaskType()
long
getTotal()
CompactionInfo.Unit
getUnit()
java.lang.String
toString()
static CompactionInfo
withoutSSTables(TableMetadata metadata, OperationType tasktype, long completed, long total, CompactionInfo.Unit unit, java.util.UUID compactionId)
Special compaction info where we always need to cancel the compaction - for example ViewBuilderTask and AutoSavingCache where we don't know the sstables at construction
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
KEYSPACE
public static final java.lang.String KEYSPACE
- See Also:
- Constant Field Values
-
COLUMNFAMILY
public static final java.lang.String COLUMNFAMILY
- See Also:
- Constant Field Values
-
COMPLETED
public static final java.lang.String COMPLETED
- See Also:
- Constant Field Values
-
TOTAL
public static final java.lang.String TOTAL
- See Also:
- Constant Field Values
-
TASK_TYPE
public static final java.lang.String TASK_TYPE
- See Also:
- Constant Field Values
-
UNIT
public static final java.lang.String UNIT
- See Also:
- Constant Field Values
-
COMPACTION_ID
public static final java.lang.String COMPACTION_ID
- See Also:
- Constant Field Values
-
SSTABLES
public static final java.lang.String SSTABLES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CompactionInfo
public CompactionInfo(TableMetadata metadata, OperationType tasktype, long bytesComplete, long totalBytes, java.util.UUID compactionId, java.util.Collection<SSTableReader> sstables)
-
-
Method Detail
-
withoutSSTables
public static CompactionInfo withoutSSTables(TableMetadata metadata, OperationType tasktype, long completed, long total, CompactionInfo.Unit unit, java.util.UUID compactionId)
Special compaction info where we always need to cancel the compaction - for example ViewBuilderTask and AutoSavingCache where we don't know the sstables at construction
-
forProgress
public CompactionInfo forProgress(long complete, long total)
- Returns:
- A copy of this CompactionInfo with updated progress.
-
getKeyspace
public java.util.Optional<java.lang.String> getKeyspace()
-
getTable
public java.util.Optional<java.lang.String> getTable()
-
getTableMetadata
public TableMetadata getTableMetadata()
-
getCompleted
public long getCompleted()
-
getTotal
public long getTotal()
-
getTaskType
public OperationType getTaskType()
-
getTaskId
public java.util.UUID getTaskId()
-
getUnit
public CompactionInfo.Unit getUnit()
-
getSSTables
public java.util.Set<SSTableReader> getSSTables()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
asMap
public java.util.Map<java.lang.String,java.lang.String> asMap()
-
-