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 StringJOURNAL_WRITESstatic StringSEGMENT_REPO_SIZEstatic StringSEGMENT_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 StringfileStoreInfoAsString()voidflushed()Notifies the monitor when journal data is flushed to disk.longgetApproximateSize()CompositeDatagetJournalWriteStatsAsCompositeData()longgetJournalWriteStatsAsCount()@NotNull CompositeDatagetRepositorySize()intgetSegmentCount()intgetTarFileCount()@NotNull CompositeDatagetWriteStats()voidinit(long initialSize)voidnotify(@NotNull SegmentId id, @NotNull SegmentNotFoundException snfe)Notification aboutSegmentNotFoundExceptionthrown by the underlying store in a meaningful way.voidreclaimed(long size)Notifies the monitor when memory is reclaimedvoidwritten(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:SegmentNotFoundExceptionListenerNotification aboutSegmentNotFoundExceptionthrown by the underlying store in a meaningful way. E.g. by logging it.- Specified by:
notifyin interfaceSegmentNotFoundExceptionListener- Parameters:
id- the segment id of the offendingSegmentsnfe- the raised exception
-
written
public void written(long delta)
Description copied from interface:FileStoreMonitorNotifies the monitor when data is written- Specified by:
writtenin interfaceFileStoreMonitor- Parameters:
delta- number of bytes written
-
reclaimed
public void reclaimed(long size)
Description copied from interface:FileStoreMonitorNotifies the monitor when memory is reclaimed- Specified by:
reclaimedin interfaceFileStoreMonitor- Parameters:
size- number of bytes reclaimed
-
flushed
public void flushed()
Description copied from interface:FileStoreMonitorNotifies the monitor when journal data is flushed to disk.- Specified by:
flushedin interfaceFileStoreMonitor
-
getApproximateSize
public long getApproximateSize()
- Specified by:
getApproximateSizein interfaceFileStoreStatsMBean
-
getTarFileCount
public int getTarFileCount()
- Specified by:
getTarFileCountin interfaceFileStoreStatsMBean- Returns:
- the number of tar files in the segment store
-
getSegmentCount
public int getSegmentCount()
- Specified by:
getSegmentCountin interfaceFileStoreStatsMBean- Returns:
- the number of segments in the segment store
-
getWriteStats
@NotNull public @NotNull CompositeData getWriteStats()
- Specified by:
getWriteStatsin interfaceFileStoreStatsMBean- Returns:
- time series of the writes to repository
-
getRepositorySize
@NotNull public @NotNull CompositeData getRepositorySize()
- Specified by:
getRepositorySizein interfaceFileStoreStatsMBean- Returns:
- time series of the writes to repository
-
fileStoreInfoAsString
public String fileStoreInfoAsString()
- Specified by:
fileStoreInfoAsStringin interfaceFileStoreStatsMBean
-
getJournalWriteStatsAsCount
public long getJournalWriteStatsAsCount()
- Specified by:
getJournalWriteStatsAsCountin interfaceFileStoreStatsMBean- Returns:
- count of the writes to journal
-
getJournalWriteStatsAsCompositeData
public CompositeData getJournalWriteStatsAsCompositeData()
- Specified by:
getJournalWriteStatsAsCompositeDatain interfaceFileStoreStatsMBean- Returns:
- time series of the writes to journal
-
-