Package org.apache.cassandra.diag.store
Class DiagnosticEventMemoryStore
java.lang.Object
org.apache.cassandra.diag.store.DiagnosticEventMemoryStore
- All Implemented Interfaces:
DiagnosticEventStore<Long>
Simple on-heap memory store that allows to buffer and retrieve a fixed number of events.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the greatest event ID that can be used to fetch events viaDiagnosticEventStore.scan(Comparable, int).voidload()Initializes the store.Returns a view on all events with a key greater than the provided value (inclusive) up to the specified number of results.voidstore(DiagnosticEvent event) Stores provided event and returns the new associated store key for it.
-
Constructor Details
-
DiagnosticEventMemoryStore
public DiagnosticEventMemoryStore()
-
-
Method Details
-
load
public void load()Description copied from interface:DiagnosticEventStoreInitializes the store.- Specified by:
loadin interfaceDiagnosticEventStore<Long>
-
store
Description copied from interface:DiagnosticEventStoreStores provided event and returns the new associated store key for it.- Specified by:
storein interfaceDiagnosticEventStore<Long>
-
scan
Description copied from interface:DiagnosticEventStoreReturns a view on all events with a key greater than the provided value (inclusive) up to the specified number of results. Events may be added or become unavailable over time. Keys must be unique, sortable and monotonically incrementing. Returns an empty map in case no events could be found.- Specified by:
scanin interfaceDiagnosticEventStore<Long>
-
getLastEventId
Description copied from interface:DiagnosticEventStoreReturns the greatest event ID that can be used to fetch events viaDiagnosticEventStore.scan(Comparable, int).- Specified by:
getLastEventIdin interfaceDiagnosticEventStore<Long>
-