net.sf.uadetector.datastore
Interface RefreshableDataStore

All Superinterfaces:
DataStore
All Known Implementing Classes:
AbstractRefreshableDataStore, CachingXmlDataStore, OnlineXmlDataStore

public interface RefreshableDataStore
extends DataStore

Extends the interface with an update functionality for UAS data in the store.

Author:
André Rouél

Field Summary
static java.lang.String MSG_FAULTY_CONTENT
          Message for the log if the read content can not be processed correctly
static java.lang.String MSG_URL_NOT_READABLE
          Message for the log if the UAS data can not be read from the given URL
 
Fields inherited from interface net.sf.uadetector.datastore.DataStore
DEFAULT_CHARSET, DEFAULT_DATA_URL, DEFAULT_VERSION_URL
 
Method Summary
 DataStore getFallback()
          This method returns a data store which will be used during start up and can be used in emergency cases.
 UpdateOperation getUpdateOperation()
          Returns the update operation of this data store which can be triggered within an executor service.
 void refresh()
          Triggers the update of the DataStore.
 
Methods inherited from interface net.sf.uadetector.datastore.DataStore
getCharset, getData, getDataReader, getDataUrl, getVersionUrl
 

Field Detail

MSG_FAULTY_CONTENT

static final java.lang.String MSG_FAULTY_CONTENT
Message for the log if the read content can not be processed correctly

See Also:
Constant Field Values

MSG_URL_NOT_READABLE

static final java.lang.String MSG_URL_NOT_READABLE
Message for the log if the UAS data can not be read from the given URL

See Also:
Constant Field Values
Method Detail

getFallback

@Nonnull
DataStore getFallback()
This method returns a data store which will be used during start up and can be used in emergency cases.

This data store will be used instantly during initialization to avoid long initializations times of an UserAgentStringParser, especially when reading data by a network connection.


getUpdateOperation

@Nonnull
UpdateOperation getUpdateOperation()
Returns the update operation of this data store which can be triggered within an executor service.

Returns:
an update operation

refresh

void refresh()
Triggers the update of the DataStore. When this action is executed, the current data URL will be read in and the DataReader parses and builds a new Data instance. Finally, the currently set Data reference will be replaced by the new one.



Copyright © 2011-2014. All Rights Reserved.