Class FileStoreStats
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.file.FileStoreStats
-
- All Implemented Interfaces:
FileStoreStatsMBean
,SegmentNotFoundExceptionListener
,FileStoreMonitor
public class FileStoreStats extends Object implements FileStoreStatsMBean, FileStoreMonitor, SegmentNotFoundExceptionListener
-
-
Field Summary
Fields Modifier and Type Field Description static String
JOURNAL_WRITES
static String
SEGMENT_REPO_SIZE
static String
SEGMENT_WRITES
-
Fields inherited from interface org.apache.jackrabbit.oak.segment.file.FileStoreStatsMBean
TYPE
-
Fields inherited from interface org.apache.jackrabbit.oak.segment.SegmentNotFoundExceptionListener
IGNORE_SNFE, LOG_SNFE
-
-
Constructor Summary
Constructors Constructor Description FileStoreStats(StatisticsProvider statisticsProvider, FileStore store, long initialSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
fileStoreInfoAsString()
void
flushed()
Notifies the monitor when journal data is flushed to disk.long
getApproximateSize()
CompositeData
getJournalWriteStatsAsCompositeData()
long
getJournalWriteStatsAsCount()
@NotNull CompositeData
getRepositorySize()
int
getSegmentCount()
int
getTarFileCount()
@NotNull CompositeData
getWriteStats()
void
init(long initialSize)
void
notify(@NotNull SegmentId id, @NotNull SegmentNotFoundException snfe)
Notification aboutSegmentNotFoundException
thrown by the underlying store in a meaningful way.void
reclaimed(long size)
Notifies the monitor when memory is reclaimedvoid
written(long delta)
Notifies the monitor when data is written
-
-
-
Field Detail
-
SEGMENT_REPO_SIZE
public static final String SEGMENT_REPO_SIZE
- See Also:
- Constant Field Values
-
SEGMENT_WRITES
public static final String SEGMENT_WRITES
- See Also:
- Constant Field Values
-
JOURNAL_WRITES
public static final String JOURNAL_WRITES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FileStoreStats
public FileStoreStats(StatisticsProvider statisticsProvider, FileStore store, long initialSize)
-
-
Method Detail
-
init
public void init(long initialSize)
-
notify
public void notify(@NotNull @NotNull SegmentId id, @NotNull @NotNull SegmentNotFoundException snfe)
Description copied from interface:SegmentNotFoundExceptionListener
Notification aboutSegmentNotFoundException
thrown by the underlying store in a meaningful way. E.g. by logging it.- Specified by:
notify
in interfaceSegmentNotFoundExceptionListener
- Parameters:
id
- the segment id of the offendingSegment
snfe
- the raised exception
-
written
public void written(long delta)
Description copied from interface:FileStoreMonitor
Notifies the monitor when data is written- Specified by:
written
in interfaceFileStoreMonitor
- Parameters:
delta
- number of bytes written
-
reclaimed
public void reclaimed(long size)
Description copied from interface:FileStoreMonitor
Notifies the monitor when memory is reclaimed- Specified by:
reclaimed
in interfaceFileStoreMonitor
- Parameters:
size
- number of bytes reclaimed
-
flushed
public void flushed()
Description copied from interface:FileStoreMonitor
Notifies the monitor when journal data is flushed to disk.- Specified by:
flushed
in interfaceFileStoreMonitor
-
getApproximateSize
public long getApproximateSize()
- Specified by:
getApproximateSize
in interfaceFileStoreStatsMBean
-
getTarFileCount
public int getTarFileCount()
- Specified by:
getTarFileCount
in interfaceFileStoreStatsMBean
- Returns:
- the number of tar files in the segment store
-
getSegmentCount
public int getSegmentCount()
- Specified by:
getSegmentCount
in interfaceFileStoreStatsMBean
- Returns:
- the number of segments in the segment store
-
getWriteStats
@NotNull public @NotNull CompositeData getWriteStats()
- Specified by:
getWriteStats
in interfaceFileStoreStatsMBean
- Returns:
- time series of the writes to repository
-
getRepositorySize
@NotNull public @NotNull CompositeData getRepositorySize()
- Specified by:
getRepositorySize
in interfaceFileStoreStatsMBean
- Returns:
- time series of the writes to repository
-
fileStoreInfoAsString
public String fileStoreInfoAsString()
- Specified by:
fileStoreInfoAsString
in interfaceFileStoreStatsMBean
-
getJournalWriteStatsAsCount
public long getJournalWriteStatsAsCount()
- Specified by:
getJournalWriteStatsAsCount
in interfaceFileStoreStatsMBean
- Returns:
- count of the writes to journal
-
getJournalWriteStatsAsCompositeData
public CompositeData getJournalWriteStatsAsCompositeData()
- Specified by:
getJournalWriteStatsAsCompositeData
in interfaceFileStoreStatsMBean
- Returns:
- time series of the writes to journal
-
-