Class AbstractStorageHandler
java.lang.Object
com.jalios.jcms.analytics.storage.AbstractStorageHandler
- Direct Known Subclasses:
FileSystemStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompress(int beforeDays) abstract AbstractEventDataProvidergetEventDataProvider(StatisticContext context) Build aAbstractEventDataProviderto provide data for analysisgetName()abstract InstantRetrieve the older date from the analytics fileabstract voidinit(String propertyPrefix, JProperties subProperties) Init aEventDatastorageabstract booleanindicate if theAbstractStorageHandleris the eventData provider for analysis or not.booleanvoidvoidsetEnabled(boolean enabled) voidvoidshutdown()shutdown aAbstractEventDataProviderinstanceabstract voidwriteEvent(EventData data) Write aEventDatain the storage
-
Constructor Details
-
AbstractStorageHandler
public AbstractStorageHandler()
-
-
Method Details
-
init
Init aEventDatastorage- Parameters:
propertyPrefix- used to configure the handlersubProperties- theJPropertieswith the handler's properties
-
writeEvent
Write aEventDatain the storage- Parameters:
data- theEventDatato write- Throws:
StorageException- exception throw by the storage subsystem
-
getOlderAnalyticsDataDate
Retrieve the older date from the analytics file- Returns:
- the older date if any, null otherwise
-
isAnalysisProvider
public abstract boolean isAnalysisProvider()indicate if theAbstractStorageHandleris the eventData provider for analysis or not. Note only oneAbstractStorageHandlershould be enabled for analysis at runtime- Returns:
- true if the
AbstractStorageHandleris enabled for provided analysis data, false otherwise
-
getEventDataProvider
public abstract AbstractEventDataProvider getEventDataProvider(StatisticContext context) throws StorageException Build aAbstractEventDataProviderto provide data for analysis- Parameters:
context- theStatisticContextused to create theEventDataprovider- Returns:
- the
AbstractEventDataProvider - Throws:
StorageException- if theEventDatacannot be created
-
shutdown
public void shutdown()shutdown aAbstractEventDataProviderinstance -
purge
-
compress
public void compress(int beforeDays) -
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) -
getName
-
setName
-