Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DatabaseDefinition.cs
1using System.Threading.Tasks;
3using Waher.Things;
5
7{
12 {
13 internal const string Id = "DatabaseDefinition";
14
21 : base(Source, null)
22 {
23 }
24
28 [Page(7, "Configuration")]
29 [Header(24, "Folder:")]
30 [ToolTip(25, "Folder, relative to the application data folder, where object database files will be stored.")]
31 [ReadOnly]
32 public string Folder { get; internal set; }
33
37 [Page(7, "Configuration")]
38 [Header(26, "Default Collection Name:")]
39 [ToolTip(27, "Name of the collection to use, if the class definition lacks a collection definition.")]
40 [ReadOnly]
41 public string DefaultCollectionName { get; internal set; }
42
46 [Page(7, "Configuration")]
47 [Header(28, "Block Size:")]
48 [ToolTip(29, "Number of bytes of each B-Tree block in the database.")]
49 [ReadOnly]
50 public int BlockSize { get; internal set; }
51
55 [Page(7, "Configuration")]
56 [Header(30, "Blocks in Cache:")]
57 [ToolTip(31, "Number of blocks to maintain in internal memory.")]
58 [ReadOnly]
59 public int BlocksInCache { get; internal set; }
60
64 [Page(7, "Configuration")]
65 [Header(32, "BLOB Block Size:")]
66 [ToolTip(33, "Number of bytes of each BLOB block in the database.")]
67 [ReadOnly]
68 public int BlobBlockSize { get; internal set; }
69
73 [Page(7, "Configuration")]
74 [Header(34, "Timeout (ms):")]
75 [ToolTip(35, "Timeout of database operations, in milliseconds.")]
76 public int TimeoutMs { get; set; }
77
81 [Page(7, "Configuration")]
82 [Header(36, "Encrypted.")]
83 [ToolTip(37, "If the database is encrypted.")]
84 [ReadOnly]
85 public bool Encrypted { get; internal set; }
86
90 [Page(7, "Configuration")]
91 [Header(38, "Compiled.")]
92 [ToolTip(39, "If object serializers should be compiled or not.")]
93 [Text(TextPosition.AfterField, 63, "Note: Changes will take effect after broker has been restarted.")]
94 public bool Compiled { get; set; }
95
99 public override string NodeId => Id;
100
105 public override Task<string> GetTypeNameAsync(Language Language) => Language.GetStringAsync(typeof(GatewayConfigSource), 23, "Database Definition");
106
112 public override Task<bool> CanDestroyAsync(RequestOrigin Caller)
113 {
114 return Task.FromResult(false);
115 }
116 }
117}
Contains information about a language.
Definition: Language.cs:17
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Definition: Language.cs:209
Abstract base class for gateway configuration nodes.
GatewayConfigSource Source
Source hosting the node.
int TimeoutMs
Timeout of database operations, in milliseconds.
int BlockSize
Number of bytes of each B-Tree block in the database.
int BlocksInCache
Number of blocks to maintain in internal memory.
override Task< bool > CanDestroyAsync(RequestOrigin Caller)
If the node can be destroyed to by the caller.
string Folder
Folder, relative to the application data folder, where object database files will be stored.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
bool Compiled
If object serializers should be compiled or not.
int BlobBlockSize
Number of bytes of each BLOB block in the database.
string DefaultCollectionName
Name of the collection to use, if the class definition lacks a collection definition.
DatabaseDefinition(GatewayConfigSource Source)
Contains the local database definition.
Tokens available in request.
Definition: RequestOrigin.cs:9
TextPosition
Where the instructions are to be place.
Definition: TextAttribute.cs:9