aboutsummaryrefslogtreecommitdiff
path: root/VNLib.Data.Caching/VNLib.Data.Caching.xml
blob: 475f0a95679ec3dbf7f550ba1f556cab3921cebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<?xml version="1.0"?>
<!--
Copyright (c) 2022 Vaughn Nugent
-->
<doc>
    <assembly>
        <name>VNLib.Data.Caching</name>
    </assembly>
    <members>
        <member name="T:VNLib.Data.Caching.BlobCache">
            <summary>
            A general purpose binary data storage
            </summary>
        </member>
        <member name="P:VNLib.Data.Caching.BlobCache.IsReadOnly">
            <inheritdoc/>
        </member>
        <member name="P:VNLib.Data.Caching.BlobCache.MaxCapacity">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.BlobCache.#ctor(System.IO.DirectoryInfo,System.Int32,VNLib.Utils.Logging.ILogProvider,VNLib.Utils.Memory.PrivateHeap)">
            <summary>
            Initializes a new <see cref="T:VNLib.Data.Caching.BlobCache"/> store
            </summary>
            <param name="swapDir">The <see cref="T:VNLib.Utils.IO.IsolatedStorageDirectory"/> to swap blob data to when cache</param>
            <param name="maxCapacity">The maximum number of items to keep in memory</param>
            <param name="log">A <see cref="T:VNLib.Utils.Logging.ILogProvider"/> to write log data to</param>
            <param name="heap">A <see cref="T:VNLib.Utils.Memory.PrivateHeap"/> to allocate buffers and store <see cref="T:VNLib.Data.Caching.BlobItem"/> data in memory</param>
        </member>
        <member name="M:VNLib.Data.Caching.BlobCache.SwapAllToDiskAsync">
            <summary>
            Swaps all <see cref="T:VNLib.Data.Caching.BlobItem"/>s that are cached in memory
            to disk.
            </summary>
        </member>
        <member name="M:VNLib.Data.Caching.BlobCache.CacheMiss(System.String,VNLib.Data.Caching.BlobItem@)">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.BlobCache.Evicted(System.Collections.Generic.KeyValuePair{System.String,VNLib.Data.Caching.BlobItem})">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.BlobCache.TryChangeKey(System.String,System.String,VNLib.Data.Caching.BlobItem@)">
            <summary>
            If the <see cref="T:VNLib.Data.Caching.BlobItem"/> is found in the store, changes the key 
            that referrences the blob. 
            </summary>
            <param name="currentKey">The key that currently referrences the blob in the store</param>
            <param name="newKey">The new key that will referrence the blob</param>
            <param name="blob">The <see cref="T:VNLib.Data.Caching.BlobItem"/> if its found in the store</param>
            <returns>True if the record was found and the key was changes</returns>
        </member>
        <member name="M:VNLib.Data.Caching.BlobCache.Remove(System.String)">
            <summary>
            Removes the <see cref="T:VNLib.Data.Caching.BlobItem"/> from the store without disposing the blobl
            </summary>
            <param name="key">The key that referrences the <see cref="T:VNLib.Data.Caching.BlobItem"/> in the store</param>
            <returns>A value indicating if the blob was removed</returns>
        </member>
        <member name="M:VNLib.Data.Caching.BlobCache.Clear">
            <summary>
            Removes and disposes all blobl elements in cache (or in the backing store)
            </summary>
        </member>
        <member name="T:VNLib.Data.Caching.BlobItem">
            <summary>
            A general purpose binary storage item 
            </summary>
        </member>
        <member name="P:VNLib.Data.Caching.BlobItem.LastModified">
            <summary>
            The time the blob was last modified
            </summary>
        </member>
        <member name="P:VNLib.Data.Caching.BlobItem.FileSize">
            <summary>
            Gets the current size of the file (in bytes) as an atomic operation
            </summary>
        </member>
        <member name="P:VNLib.Data.Caching.BlobItem.OpLock">
            <summary>
            The operation synchronization lock
            </summary>
        </member>
        <member name="M:VNLib.Data.Caching.BlobItem.#ctor(VNLib.Utils.Memory.PrivateHeap)">
            <summary>
            Initializes a new <see cref="T:VNLib.Data.Caching.BlobItem"/>
            </summary>
            <param name="heap">The heap to allocate buffers from</param>
        </member>
        <member name="M:VNLib.Data.Caching.BlobItem.Free">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.BlobItem.Read(System.Span{System.Byte})">
            <summary>
            Reads data from the internal buffer and copies it to the specified buffer.
            Use the <see cref="P:VNLib.Data.Caching.BlobItem.FileSize"/> property to obtain the size of the internal buffer
            </summary>
            <param name="buffer">The buffer to copy data to</param>
            <returns>When completed, the number of bytes copied to the buffer</returns>
        </member>
        <member name="M:VNLib.Data.Caching.BlobItem.Write(System.ReadOnlySpan{System.Byte})">
            <summary>
            Overwrites the internal buffer with the contents of the supplied buffer
            </summary>
            <param name="buffer">The buffer containing data to store within the blob</param>
            <returns>A <see cref="T:System.Threading.Tasks.ValueTask"/> that completes when write access has been granted and copied</returns>
            <exception cref="T:System.InvalidOperationException"></exception>
        </member>
        <member name="M:VNLib.Data.Caching.BlobItem.SwapToDiskAsync(VNLib.Utils.Memory.PrivateHeap,System.IO.DirectoryInfo,System.String,VNLib.Utils.Logging.ILogProvider)">
            <summary>
            Writes the contents of the memory buffer to its designated file on the disk
            </summary>
            <param name="heap">The heap to allocate buffers from</param>
            <param name="swapDir">The <see cref="T:VNLib.Utils.IO.IsolatedStorageDirectory"/> that stores the file</param>
            <param name="filename">The name of the file to write data do</param>
            <param name="log">A log to write errors to</param>
            <returns>A task that completes when the swap to disk is complete</returns>
        </member>
        <member name="M:VNLib.Data.Caching.BlobItem.SwapFromDiskAsync(VNLib.Utils.Memory.PrivateHeap,System.IO.DirectoryInfo,System.String,VNLib.Utils.Logging.ILogProvider)">
            <summary>
            Reads the contents of the blob into a memory buffer from its designated file on disk
            </summary>
            <param name="heap">The heap to allocate buffers from</param>
            <param name="swapDir">The <see cref="T:VNLib.Utils.IO.IsolatedStorageDirectory"/> that stores the file</param>
            <param name="filename">The name of the file to write the blob data to</param>
            <param name="log">A log to write errors to</param>
            <returns>A task that completes when the swap from disk is complete</returns>
        </member>
        <member name="T:VNLib.Data.Caching.CacheListener">
            <summary>
            A base implementation of a memory/disk LRU data cache FBM listener
            </summary>
        </member>
        <member name="P:VNLib.Data.Caching.CacheListener.Cache">
            <summary>
            The Cache store to access data blobs
            </summary>
        </member>
        <member name="P:VNLib.Data.Caching.CacheListener.Heap">
            <summary>
            The <see cref="T:VNLib.Utils.Memory.PrivateHeap"/> to allocate buffers from
            </summary>
        </member>
        <member name="M:VNLib.Data.Caching.CacheListener.InitCache(System.IO.DirectoryInfo,System.Int32,VNLib.Utils.Memory.PrivateHeap)">
            <summary>
            Initializes the <see cref="P:VNLib.Data.Caching.CacheListener.Cache"/> data store
            </summary>
            <param name="dir"></param>
            <param name="cacheSize"></param>
            <param name="heap"></param>
        </member>
        <member name="M:VNLib.Data.Caching.CacheListener.SwapToDiskAsync">
            <summary>
            Asynchronously swaps all blobs to the disk
            </summary>
            <returns></returns>
        </member>
        <member name="M:VNLib.Data.Caching.CacheListener.Dispose(System.Boolean)">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.CacheListener.Dispose">
            <inheritdoc/>
        </member>
        <member name="T:VNLib.Data.Caching.ClientExtensions">
            <summary>
            Provides caching extension methods for <see cref="T:VNLib.Net.Messaging.FBM.Client.FBMClient"/>
            </summary>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.GetObjectAsync``1(VNLib.Net.Messaging.FBM.Client.FBMClient,System.String,System.Text.Json.JsonSerializerOptions,System.Threading.CancellationToken)">
            <summary>
            Gets an object from the server if it exists
            </summary>
            <typeparam name="T"></typeparam>
            <param name="client"></param>
            <param name="objectId">The id of the object to get</param>
            <param name="jso">The <see cref="T:System.Text.Json.JsonSerializerOptions"/> to use for serialization</param>
            <param name="cancellationToken">A token to cancel the operation</param>
            <returns>A task that completes to return the results of the response payload</returns>
            <exception cref="T:System.Text.Json.JsonException"></exception>
            <exception cref="T:System.OutOfMemoryException"></exception>
            <exception cref="T:VNLib.Data.Caching.Exceptions.InvalidStatusException"></exception>
            <exception cref="T:System.ObjectDisposedException"></exception>
            <exception cref="T:VNLib.Net.Messaging.FBM.Client.InvalidResponseException"></exception>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.AddOrUpdateObjectAsync``1(VNLib.Net.Messaging.FBM.Client.FBMClient,System.String,System.String,``0,System.Text.Json.JsonSerializerOptions,System.Threading.CancellationToken)">
            <summary>
            Updates the state of the session, and optionally updates the ID of the session. The data 
            property is buffered and streamed to the remote server
            </summary>
            <typeparam name="T"></typeparam>
            <param name="client"></param>
            <param name="objectId">The id of the object to update or replace</param>
            <param name="newId">An optional parameter to specify a new ID for the old object</param>
            <param name="data">The payload data to serialize and set as the data state of the session</param>
            <param name="jso">Optional <see cref="T:System.Text.Json.JsonSerializerOptions"/></param>
            <param name="cancellationToken">A token to cancel the operation</param>
            <returns>A task that resolves when the server responds</returns>
            <exception cref="T:System.Text.Json.JsonException"></exception>
            <exception cref="T:System.OutOfMemoryException"></exception>
            <exception cref="T:VNLib.Data.Caching.Exceptions.InvalidStatusException"></exception>
            <exception cref="T:System.ObjectDisposedException"></exception>
            <exception cref="T:VNLib.Net.Messaging.FBM.Client.InvalidResponseException"></exception>
            <exception cref="T:VNLib.Data.Caching.Exceptions.MessageTooLargeException"></exception>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.DeleteObjectAsync(VNLib.Net.Messaging.FBM.Client.FBMClient,System.String,System.Threading.CancellationToken)">
            <summary>
            Asynchronously deletes an object in the remote store
            </summary>
            <param name="client"></param>
            <param name="objectId">The id of the object to update or replace</param>
            <param name="cancellationToken">A token to cancel the operation</param>
            <returns>A task that resolves when the operation has completed</returns>
            <exception cref="T:VNLib.Data.Caching.Exceptions.InvalidStatusException"></exception>
            <exception cref="T:System.ObjectDisposedException"></exception>
            <exception cref="T:VNLib.Net.Messaging.FBM.Client.InvalidResponseException"></exception>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.ObjectId(VNLib.Net.Messaging.FBM.Server.FBMContext)">
            <summary>
            Gets the Object-id for the request message, or throws an <see cref="T:System.InvalidOperationException"/> if not specified
            </summary>
            <param name="context"></param>
            <returns>The id of the object requested</returns>
            <exception cref="T:System.InvalidOperationException"></exception>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.NewObjectId(VNLib.Net.Messaging.FBM.Server.FBMContext)">
            <summary>
            Gets the new ID of the object if specified from the request. Null if the request did not specify an id update
            </summary>
            <param name="context"></param>
            <returns>The new ID of the object if speicifed, null otherwise</returns>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.Method(VNLib.Net.Messaging.FBM.Server.FBMContext)">
            <summary>
            Gets the request method for the request
            </summary>
            <param name="context"></param>
            <returns>The request method string</returns>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.CloseResponse(VNLib.Net.Messaging.FBM.Server.FBMContext,System.String,System.IO.Stream)">
            <summary>
            Closes a response with a status code
            </summary>
            <param name="context"></param>
            <param name="responseCode">The status code to send to the client</param>
            <param name="payload">The payload to send to the client</param>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.CloseResponse(VNLib.Net.Messaging.FBM.Server.FBMContext,System.String)">
            <summary>
            Closes a response with a status code
            </summary>
            <param name="context"></param>
            <param name="responseCode">The status code to send to the client</param>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.SetAuth(VNLib.Net.Messaging.FBM.Client.FBMClientWorkerBase,System.ReadOnlySpan{System.Byte},System.Int32)">
            <summary>
            Computes the authorization headers for the initial client connection
            </summary>
            <param name="worker"></param>
            <param name="secret">The pre-shared secret used to compute a secure hash of a random token</param>
            <param name="saltSize">The size (in bytes) of the salt to compute the hash of</param>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.Authorized(VNLib.Net.Http.ConnectionInfo,System.ReadOnlySpan{System.Byte})">
            <summary>
            Determines if the client has the proper authorization by verifying the client data can compute the same hash result with 
            the specified secret
            </summary>
            <param name="server"></param>
            <param name="secret">The pre-shared secret used to verify the data</param>
            <returns>True if the authorization headers compute to the proper hash result (keys match), false otherwise</returns>
            <remarks>The verification is fixed-time</remarks>
            <exception cref="T:System.OutOfMemoryException"></exception>
        </member>
        <member name="M:VNLib.Data.Caching.ClientExtensions.SetReconnectPolicy(VNLib.Net.Messaging.FBM.Client.FBMClientWorkerBase,System.TimeSpan,System.Uri)">
            <summary>
            Initializes the worker for a reconnect policy and returns an object that can listen for changes
            and configure the connection as necessary
            </summary>
            <param name="worker"></param>
            <param name="retryDelay">The amount of time to wait between retries</param>
            <param name="serverUri">The uri to reconnect the client to</param>
            <returns>A <see cref="T:VNLib.Data.Caching.ClientRetryManager"/> for listening for retry events</returns>
        </member>
        <member name="T:VNLib.Data.Caching.ClientRetryManager">
            <summary>
            Manages a <see cref="T:VNLib.Net.Messaging.FBM.Client.FBMClientWorkerBase"/> reconnect policy
            </summary>
        </member>
        <member name="E:VNLib.Data.Caching.ClientRetryManager.OnBeforeReconnect">
            <summary>
            Raised before client is to be reconnected
            </summary>
        </member>
        <member name="E:VNLib.Data.Caching.ClientRetryManager.OnReconnectFailed">
            <summary>
            Raised when the client fails to reconnect. Should return a value that instructs the 
            manager to reconnect
            </summary>
        </member>
        <member name="E:VNLib.Data.Caching.ClientRetryManager.OnSuccessfulReconnect">
            <summary>
            Raised when the client websocket is successfully reconnected
            </summary>
        </member>
        <member name="T:VNLib.Data.Caching.Constants.Actions">
            <summary>
            Contains constants the define actions
            </summary>
        </member>
        <member name="T:VNLib.Data.Caching.Constants.ResponseCodes">
            <summary>
            Containts constants for operation response codes
            </summary>
        </member>
        <member name="T:VNLib.Data.Caching.Exceptions.InvalidStatusException">
            <summary>
            Raised when the response status code of an FBM Request message is not valid for 
            the specified request
            </summary>
        </member>
        <member name="M:VNLib.Data.Caching.Exceptions.InvalidStatusException.#ctor(System.String,System.String)">
            <summary>
            Initalizes a new <see cref="T:VNLib.Data.Caching.Exceptions.InvalidStatusException"/> with the specfied status code
            </summary>
            <param name="message"></param>
            <param name="statusCode"></param>
        </member>
        <member name="M:VNLib.Data.Caching.Exceptions.InvalidStatusException.#ctor">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.Exceptions.InvalidStatusException.#ctor(System.String)">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.Exceptions.InvalidStatusException.#ctor(System.String,System.Exception)">
            <inheritdoc/>
        </member>
        <member name="P:VNLib.Data.Caching.Exceptions.InvalidStatusException.Message">
            <inheritdoc/>
        </member>
        <member name="T:VNLib.Data.Caching.Exceptions.MessageTooLargeException">
            <summary>
            Raised when a request (or server response) calculates the size of the message to be too large to proccess
            </summary>
        </member>
        <member name="M:VNLib.Data.Caching.Exceptions.MessageTooLargeException.#ctor">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.Exceptions.MessageTooLargeException.#ctor(System.String)">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.Exceptions.MessageTooLargeException.#ctor(System.String,System.Exception)">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Data.Caching.Exceptions.MessageTooLargeException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
            <inheritdoc/>
        </member>
    </members>
</doc>