Class BrowsingDatabaseManager
Database Manager.
Inheritance
Implements
Inherited Members
Namespace: Gee.External.Browsing.Services
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class BrowsingDatabaseManager : IDisposable
Remarks
Represents a database manager that setups a database and periodically synchronizes it with threat lists updates retrieved from the Google Safe Browsing API. Once a database manager is created, it will periodically run a synchronization operation on a background thread to retrieve threat list updates from the Google Safe Browsing API, remove stale threat from, and add new threat to a database until it is disposed. Between every synchronization operation, the database manager will pause for a period indicated by the Google Safe Browsing API. If the Google Safe Browsing API does not indicate a period to pause for, an implementation specific period is used. To indicate when a synchronization operation has started and either completed successfully or failed, the database manager raises relevant events you can register event handlers for.
Unless you restrict it to do so otherwise, by default a database manager will retrieve threat list updates for all threat lists made available by the Google Safe Browsing API. When a synchronization operation runs, it will not only synchronize existing threat lists in the database but it will also synchronize new threat lists made available, if any, since the last synchronization operation. While this may have the desired effect of ensuring a database is synchronized with all available threat lists, it will have a significant impact on the amount of time needed to do so as well as on bandwidth, memory, and disk utilization. As a rule of thumb, the more threat lists that need to be synchronized, the longer it will take for a synchronization operation to complete and the more bandwidth, memory, and disk utilization that will be required. If you are not interested in retrieving threat list updates for all available threat lists, you are encouraged to restrict a database manager to the specific threat lists you are interested in to minimize resource utilization.
Methods
Build()
Build a Database Synchronizer.
Declaration
public static BrowsingDatabaseManagerBuilder Build()
Returns
Type | Description |
---|---|
BrowsingDatabaseManagerBuilder | A BrowsingDatabaseManagerBuilder to build a database synchronizer with. |
Dispose()
Dispose Object.
Declaration
public void Dispose()
Events
ThreatListSynchronizationCompleted
Threat List Synchronization Completed Event.
Declaration
public event Action<ThreatListSynchronizationCompletedEventArgs> ThreatListSynchronizationCompleted
Event Type
Type | Description |
---|---|
System.Action<ThreatListSynchronizationCompletedEventArgs> |
ThreatListSynchronizationFailed
Threat List Synchronization Failed Event.
Declaration
public event Action<ThreatListSynchronizationFailedEventArgs> ThreatListSynchronizationFailed
Event Type
Type | Description |
---|---|
System.Action<ThreatListSynchronizationFailedEventArgs> |