public class FileSystemStorage extends AbstractStorageHandler
Constructor and Description |
---|
FileSystemStorage() |
Modifier and Type | Method and Description |
---|---|
AbstractEventDataProvider |
getEventDataProvider(StatisticContext context)
Build an
AbstractEventDataProvider to provide data for analysis |
java.io.File |
getEventDirectory()
Retrieve event data directory
|
java.time.Instant |
getOlderAnalyticsDataDate()
Retrieve the older date from the analytics file
|
void |
init(java.lang.String propertyPrefix,
JProperties subProperties)
Create a
EventData storage (in a directory of the current file system) |
boolean |
isAnalysisProvider()
indicate if the
AbstractStorageHandler is the eventData provider for analysis or not. |
void |
writeEvent(EventData data)
Write an
EventData in the file |
getName, isEnabled, setEnabled, setName
public void init(java.lang.String propertyPrefix, JProperties subProperties)
EventData
storage (in a directory of the current file system)init
in class AbstractStorageHandler
String
- propertyPrefix used to configure the handlersubProperties
- the JProperties
with the handler's propertiespublic void writeEvent(EventData data) throws StorageException
EventData
in the filewriteEvent
in class AbstractStorageHandler
data
- the EventData
StorageException
- Exception thrown when eventData is save as JSON datapublic java.time.Instant getOlderAnalyticsDataDate()
getOlderAnalyticsDataDate
in class AbstractStorageHandler
public boolean isAnalysisProvider()
AbstractStorageHandler
AbstractStorageHandler
is the eventData provider for analysis or not.
Note only one AbstractStorageHandler
should be enabled for analysis at runtimeisAnalysisProvider
in class AbstractStorageHandler
AbstractStorageHandler
is enabled for provided analysis data, false otherwisepublic AbstractEventDataProvider getEventDataProvider(StatisticContext context) throws StorageException
AbstractStorageHandler
AbstractEventDataProvider
to provide data for analysisgetEventDataProvider
in class AbstractStorageHandler
context
- the StatisticContext
used to create the EventData
providerAbstractEventDataProvider
StorageException
- if the EventData
cannot be createdpublic java.io.File getEventDirectory()
Copyright © 2001-2017 Jalios SA. All Rights Reserved.