@fluidframework/task-manager 2.0.0-internal.3.0.0 → 2.0.0-internal.3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/interfaces.ts CHANGED
@@ -9,66 +9,66 @@ import { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-objec
9
9
  * Events emitted by {@link TaskManager}.
10
10
  */
11
11
  export interface ITaskManagerEvents extends ISharedObjectEvents {
12
- /**
13
- * Notifies when the local client has reached the front of the queue, left the queue, or a task was completed.
14
- * Does not account for known pending ops, but instead only reflects the current state.
15
- */
16
- (event: "assigned" | "completed" | "lost", listener: (taskId: string) => void);
12
+ /**
13
+ * Notifies when the local client has reached the front of the queue, left the queue, or a task was completed.
14
+ * Does not account for known pending ops, but instead only reflects the current state.
15
+ */
16
+ (event: "assigned" | "completed" | "lost", listener: (taskId: string) => void);
17
17
  }
18
18
 
19
19
  /**
20
20
  * Task manager interface
21
21
  */
22
22
  export interface ITaskManager extends ISharedObject<ITaskManagerEvents> {
23
- /**
24
- * Volunteer for the task. Returns a promise that resolves `true` if the task is assigned to the local client and
25
- * `false` if the task was completed by another client. It rejects if the local client abandoned the task or
26
- * disconnected while in queue.
27
- * @param taskId - Identifier for the task
28
- */
29
- volunteerForTask(taskId: string): Promise<boolean>;
23
+ /**
24
+ * Volunteer for the task. Returns a promise that resolves `true` if the task is assigned to the local client and
25
+ * `false` if the task was completed by another client. It rejects if the local client abandoned the task or
26
+ * disconnected while in queue.
27
+ * @param taskId - Identifier for the task
28
+ */
29
+ volunteerForTask(taskId: string): Promise<boolean>;
30
30
 
31
- /**
32
- * Continuously volunteer for the task. Watch the "assigned" event to determine if the task is assigned.
33
- * The local client will automatically re-enter the queue if it disconnects.
34
- * @param taskId - Identifier for the task
35
- */
36
- subscribeToTask(taskId: string): void;
31
+ /**
32
+ * Continuously volunteer for the task. Watch the "assigned" event to determine if the task is assigned.
33
+ * The local client will automatically re-enter the queue if it disconnects.
34
+ * @param taskId - Identifier for the task
35
+ */
36
+ subscribeToTask(taskId: string): void;
37
37
 
38
- /**
39
- * Exit the queue, releasing the task if currently assigned.
40
- * @param taskId - Identifier for the task
41
- */
42
- abandon(taskId: string): void;
38
+ /**
39
+ * Exit the queue, releasing the task if currently assigned.
40
+ * @param taskId - Identifier for the task
41
+ */
42
+ abandon(taskId: string): void;
43
43
 
44
- /**
45
- * Check whether this client is the current assignee for the task and there is no outstanding abandon op that
46
- * would abandon the assignment.
47
- * @param taskId - Identifier for the task
48
- */
49
- assigned(taskId: string): boolean;
44
+ /**
45
+ * Check whether this client is the current assignee for the task and there is no outstanding abandon op that
46
+ * would abandon the assignment.
47
+ * @param taskId - Identifier for the task
48
+ */
49
+ assigned(taskId: string): boolean;
50
50
 
51
- /**
52
- * Check whether this client is either the current assignee, in queue, or we expect they will be in queue after
53
- * outstanding ops have been ack'd.
54
- * @param taskId - Identifier for the task
55
- */
56
- queued(taskId: string): boolean;
51
+ /**
52
+ * Check whether this client is either the current assignee, in queue, or we expect they will be in queue after
53
+ * outstanding ops have been ack'd.
54
+ * @param taskId - Identifier for the task
55
+ */
56
+ queued(taskId: string): boolean;
57
57
 
58
- /**
59
- * Check whether this client is currently subscribed to the task.
60
- * @param taskId - Identifier for the task
61
- */
62
- subscribed(taskId: string): boolean;
58
+ /**
59
+ * Check whether this client is currently subscribed to the task.
60
+ * @param taskId - Identifier for the task
61
+ */
62
+ subscribed(taskId: string): boolean;
63
63
 
64
- /**
65
- * Marks a task as completed and releases all clients from its queue.
66
- * @param taskId - Identifier for the task
67
- */
68
- complete(taskId: string): void;
64
+ /**
65
+ * Marks a task as completed and releases all clients from its queue.
66
+ * @param taskId - Identifier for the task
67
+ */
68
+ complete(taskId: string): void;
69
69
 
70
- /**
71
- * Check whether this client can currently volunteer for a task.
72
- */
73
- canVolunteer(): boolean;
70
+ /**
71
+ * Check whether this client can currently volunteer for a task.
72
+ */
73
+ canVolunteer(): boolean;
74
74
  }
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/task-manager";
9
- export const pkgVersion = "2.0.0-internal.3.0.0";
9
+ export const pkgVersion = "2.0.0-internal.3.1.0";