Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ILedgerProvider.cs
1using System;
2using System.Threading.Tasks;
5
6namespace Waher.Persistence
7{
11 public interface ILedgerProvider
12 {
18 void Register(ILedgerExternalEvents ExternalEvents);
19
25 void Unregister(ILedgerExternalEvents ExternalEvents);
26
31 Task NewEntry(object Object);
32
37 Task UpdatedEntry(object Object);
38
43 Task DeletedEntry(object Object);
44
49 Task ClearedCollection(string Collection);
50
56 Task<ILedgerEnumerator<T>> GetEnumerator<T>();
57
63 Task<ILedgerEnumerator<object>> GetEnumerator(string CollectionName);
64
68 Task Start();
69
73 Task Stop();
74
78 Task Flush();
79
84 Task<string[]> GetCollections();
85
93 Task<bool> Export(ILedgerExport Output, LedgerExportRestriction Restriction);
94
103 Task<bool> Export(ILedgerExport Output, LedgerExportRestriction Restriction, ProfilerThread Thread);
104 }
105}
Contains basic ledger export restrictions.
Class that keeps track of events and timing for one thread.
Interface for proxy for reporting changes to the ledger from external sources.
Interface for ledger providers that can be plugged into the static Ledger class.
Task ClearedCollection(string Collection)
Clears a collection in the ledger.
Task DeletedEntry(object Object)
Deletes an entry in the ledger.
Task Flush()
Persists any pending changes.
Task< string[]> GetCollections()
Gets an array of available collections.
Task Stop()
Called when processing ends.
Task Start()
Called when processing starts.
Task< bool > Export(ILedgerExport Output, LedgerExportRestriction Restriction)
Performs an export of the entire ledger.
void Unregister(ILedgerExternalEvents ExternalEvents)
Unregisters a recipient of external events.
Task NewEntry(object Object)
Adds an entry to the ledger.
Task< bool > Export(ILedgerExport Output, LedgerExportRestriction Restriction, ProfilerThread Thread)
Performs an export of the entire ledger.
void Register(ILedgerExternalEvents ExternalEvents)
Registers a recipient of external events.
Task< ILedgerEnumerator< T > > GetEnumerator< T >()
Gets an eumerator for objects of type T .
Task< ILedgerEnumerator< object > > GetEnumerator(string CollectionName)
Gets an eumerator for objects in a collection.
Task UpdatedEntry(object Object)
Updates an entry in the ledger.