Commit 5663a9c6ffec1a589222e24ac20e696eb4ff1f6a
rebuild docs
Signed-off-by: wanderer <mjbecze@gmail.com>wanderer committed on 1/19/2018, 2:37:45 AM
Parent: 3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3
Files changed
docs/actor.md | changed |
docs/hypervisor.md | changed |
docs/inbox.md | changed |
docs/scheduler.md | changed |
docs/capsStore.md | deleted |
docs/actor.md | ||
---|---|---|
@@ -2,11 +2,9 @@ | ||
2 | 2 | |
3 | 3 | ### Table of Contents |
4 | 4 | |
5 | 5 | - [constructor](#constructor) |
6 | -- [mintCap](#mintcap) | |
7 | 6 | - [queue](#queue) |
8 | -- [create](#create) | |
9 | 7 | - [shutdown](#shutdown) |
10 | 8 | - [startup](#startup) |
11 | 9 | - [runMessage](#runmessage) |
12 | 10 | - [incrementTicks](#incrementticks) |
@@ -14,109 +12,85 @@ | ||
14 | 12 | - [send](#send) |
15 | 13 | |
16 | 14 | ## constructor |
17 | 15 | |
18 | -[actor.js:17-32](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L17-L32 "Source code on GitHub") | |
16 | +[actor.js:15-25](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/actor.js#L15-L25 "Source code on GitHub") | |
19 | 17 | |
20 | 18 | the Actor manages the varous message passing functions and provides |
21 | 19 | an interface for the containers to use |
22 | 20 | |
23 | 21 | **Parameters** |
24 | 22 | |
25 | -- `opts` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
26 | - - `opts.id` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the UUID of the Actor | |
27 | - - `opts.state` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the state of the container | |
28 | - - `opts.hypervisor` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the instance of the hypervisor | |
29 | - - `opts.container` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the container constuctor and argments | |
23 | +- `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
24 | + - `opts.id` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the UUID of the Actor | |
25 | + - `opts.state` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the state of the container | |
26 | + - `opts.hypervisor` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the instance of the hypervisor | |
27 | + - `opts.container` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the container constuctor and argments | |
30 | 28 | |
31 | -## mintCap | |
32 | - | |
33 | -[actor.js:39-44](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L39-L44 "Source code on GitHub") | |
34 | - | |
35 | -Mints a new capabilitly with a given tag | |
36 | - | |
37 | -**Parameters** | |
38 | - | |
39 | -- `tag` **any** a tag which can be used to identify caps (optional, default `0`) | |
40 | - | |
41 | -Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
42 | - | |
43 | 29 | ## queue |
44 | 30 | |
45 | -[actor.js:51-54](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L51-L54 "Source code on GitHub") | |
31 | +[actor.js:32-39](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/actor.js#L32-L39 "Source code on GitHub") | |
46 | 32 | |
47 | 33 | adds a message to this actor's message queue |
48 | 34 | |
49 | 35 | **Parameters** |
50 | 36 | |
51 | -- `message` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
52 | -- `portName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | |
37 | +- `message` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
38 | +- `portName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | |
53 | 39 | |
54 | -## create | |
55 | - | |
56 | -[actor.js:61-67](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L61-L67 "Source code on GitHub") | |
57 | - | |
58 | -runs the creation routine for the actor | |
59 | - | |
60 | -**Parameters** | |
61 | - | |
62 | -- `message` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
63 | - | |
64 | -Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
65 | - | |
66 | 40 | ## shutdown |
67 | 41 | |
68 | -[actor.js:98-103](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L98-L103 "Source code on GitHub") | |
42 | +[actor.js:89-92](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/actor.js#L89-L92 "Source code on GitHub") | |
69 | 43 | |
70 | 44 | Runs the shutdown routine for the actor |
71 | 45 | |
72 | 46 | ## startup |
73 | 47 | |
74 | -[actor.js:108-110](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L108-L110 "Source code on GitHub") | |
48 | +[actor.js:97-99](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/actor.js#L97-L99 "Source code on GitHub") | |
75 | 49 | |
76 | 50 | Runs the startup routine for the actor |
77 | 51 | |
78 | 52 | ## runMessage |
79 | 53 | |
80 | -[actor.js:118-138](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L118-L138 "Source code on GitHub") | |
54 | +[actor.js:107-114](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/actor.js#L107-L114 "Source code on GitHub") | |
81 | 55 | |
82 | 56 | run the Actor with a given message |
83 | 57 | |
84 | 58 | **Parameters** |
85 | 59 | |
86 | -- `message` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the message to run | |
87 | -- `method` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** which method to run (optional, default `'onMessage'`) | |
60 | +- `message` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the message to run | |
61 | +- `method` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** which method to run | |
88 | 62 | |
89 | -Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
63 | +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
90 | 64 | |
91 | 65 | ## incrementTicks |
92 | 66 | |
93 | -[actor.js:144-147](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L144-L147 "Source code on GitHub") | |
67 | +[actor.js:120-123](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/actor.js#L120-L123 "Source code on GitHub") | |
94 | 68 | |
95 | 69 | updates the number of ticks that the actor has run |
96 | 70 | |
97 | 71 | **Parameters** |
98 | 72 | |
99 | -- `count` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of ticks to add | |
73 | +- `count` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of ticks to add | |
100 | 74 | |
101 | 75 | ## createActor |
102 | 76 | |
103 | -[actor.js:154-157](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L154-L157 "Source code on GitHub") | |
77 | +[actor.js:130-133](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/actor.js#L130-L133 "Source code on GitHub") | |
104 | 78 | |
105 | 79 | creates an actor |
106 | 80 | |
107 | 81 | **Parameters** |
108 | 82 | |
109 | 83 | - `type` **Integer** the type id for the container |
110 | -- `message` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** an intial [message](https://github.com/primea/js-primea-message) to send newly created actor | |
84 | +- `code` | |
85 | +- `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an intial [message](https://github.com/primea/js-primea-message) to send newly created actor | |
111 | 86 | |
112 | 87 | ## send |
113 | 88 | |
114 | -[actor.js:174-181](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/actor.js#L174-L181 "Source code on GitHub") | |
89 | +[actor.js:150-155](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/actor.js#L150-L155 "Source code on GitHub") | |
115 | 90 | |
116 | 91 | sends a message to a given port |
117 | 92 | |
118 | 93 | **Parameters** |
119 | 94 | |
120 | -- `cap` | |
121 | 95 | - `message` **Message** the message |
122 | -- `portRef` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the port | |
96 | +- `portRef` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the port |
docs/hypervisor.md | ||
---|---|---|
@@ -10,9 +10,9 @@ | ||
10 | 10 | - [registerContainer](#registercontainer) |
11 | 11 | |
12 | 12 | ## constructor |
13 | 13 | |
14 | -[index.js:10-15](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/index.js#L10-L15 "Source code on GitHub") | |
14 | +[index.js:10-15](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L10-L15 "Source code on GitHub") | |
15 | 15 | |
16 | 16 | The Hypervisor manages the container instances by instantiating them and |
17 | 17 | destorying them when possible. It also facilitates localating Containers |
18 | 18 | |
@@ -22,63 +22,64 @@ | ||
22 | 22 | - `nonce` (optional, default `0`) |
23 | 23 | |
24 | 24 | ## send |
25 | 25 | |
26 | -[index.js:23-27](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/index.js#L23-L27 "Source code on GitHub") | |
26 | +[index.js:23-27](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L23-L27 "Source code on GitHub") | |
27 | 27 | |
28 | 28 | sends a message |
29 | 29 | |
30 | 30 | **Parameters** |
31 | 31 | |
32 | -- `cap` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the capabilitly used to send the message | |
33 | -- `message` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the [message](https://github.com/primea/js-primea-message) to send | |
32 | +- `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the [message](https://github.com/primea/js-primea-message) to send | |
33 | +- `cap` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the capabilitly used to send the message | |
34 | 34 | |
35 | -Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** a promise that resolves once the receiving container is loaded | |
35 | +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** a promise that resolves once the receiving container is loaded | |
36 | 36 | |
37 | 37 | ## getActor |
38 | 38 | |
39 | -[index.js:52-63](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/index.js#L52-L63 "Source code on GitHub") | |
39 | +[index.js:55-63](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L55-L63 "Source code on GitHub") | |
40 | 40 | |
41 | 41 | gets an existsing actor |
42 | 42 | |
43 | 43 | **Parameters** |
44 | 44 | |
45 | -- `id` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the actor's ID | |
45 | +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the actor's ID | |
46 | 46 | |
47 | -Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
47 | +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
48 | 48 | |
49 | 49 | ## createActor |
50 | 50 | |
51 | -[index.js:71-85](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/index.js#L71-L85 "Source code on GitHub") | |
51 | +[index.js:71-85](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L71-L85 "Source code on GitHub") | |
52 | 52 | |
53 | 53 | creates an instance of an Actor |
54 | 54 | |
55 | 55 | **Parameters** |
56 | 56 | |
57 | 57 | - `type` **Integer** the type id for the container |
58 | -- `message` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** an intial [message](https://github.com/primea/js-primea-message) to send newly created actor | |
59 | -- `id` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the id for the actor (optional, default `{nonce:this.nonce++,parent:null}`) | |
58 | +- `code` | |
59 | +- `id` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the id for the actor (optional, default `{nonce:this.nonce++,parent:null}`) | |
60 | +- `message` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an intial [message](https://github.com/primea/js-primea-message) to send newly created actor | |
60 | 61 | |
61 | 62 | ## createStateRoot |
62 | 63 | |
63 | -[index.js:98-101](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/index.js#L98-L101 "Source code on GitHub") | |
64 | +[index.js:98-101](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L98-L101 "Source code on GitHub") | |
64 | 65 | |
65 | 66 | creates a state root starting from a given container and a given number of |
66 | 67 | ticks |
67 | 68 | |
68 | 69 | **Parameters** |
69 | 70 | |
70 | -- `ticks` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of ticks at which to create the state root (optional, default `Infinity`) | |
71 | +- `ticks` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of ticks at which to create the state root (optional, default `Infinity`) | |
71 | 72 | |
72 | -Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
73 | +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
73 | 74 | |
74 | 75 | ## registerContainer |
75 | 76 | |
76 | -[index.js:109-114](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/index.js#L109-L114 "Source code on GitHub") | |
77 | +[index.js:109-111](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/index.js#L109-L111 "Source code on GitHub") | |
77 | 78 | |
78 | 79 | regirsters a container with the hypervisor |
79 | 80 | |
80 | 81 | **Parameters** |
81 | 82 | |
82 | 83 | - `Constructor` **Class** a Class for instantiating the container |
83 | 84 | - `args` **any** any args that the contructor takes |
84 | -- `typeId` **Integer** the container's type identification ID (optional, default `Constructor.typeId`) | |
85 | +- `typeId` **Integer** the container's type identification ID |
docs/inbox.md | ||
---|---|---|
@@ -3,54 +3,40 @@ | ||
3 | 3 | ### Table of Contents |
4 | 4 | |
5 | 5 | - [constructor](#constructor) |
6 | 6 | - [queue](#queue) |
7 | -- [nextTaggedMessage](#nexttaggedmessage) | |
8 | 7 | - [nextMessage](#nextmessage) |
9 | 8 | |
10 | 9 | ## constructor |
11 | 10 | |
12 | -[inbox.js:23-31](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/inbox.js#L23-L31 "Source code on GitHub") | |
11 | +[inbox.js:24-31](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/inbox.js#L24-L31 "Source code on GitHub") | |
13 | 12 | |
14 | 13 | The inbox manages and sorts incoming messages and provides functions |
15 | 14 | to wait on messages |
16 | 15 | |
17 | 16 | **Parameters** |
18 | 17 | |
19 | -- `opts` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
20 | - - `opts.state` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
21 | - - `opts.hypervisor` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
18 | +- `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
19 | + - `opts.state` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
20 | + - `opts.hypervisor` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
22 | 21 | |
23 | 22 | ## queue |
24 | 23 | |
25 | -[inbox.js:37-47](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/inbox.js#L37-L47 "Source code on GitHub") | |
24 | +[inbox.js:41-51](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/inbox.js#L41-L51 "Source code on GitHub") | |
26 | 25 | |
27 | 26 | queues a message |
28 | 27 | |
29 | 28 | **Parameters** |
30 | 29 | |
31 | 30 | - `message` **Message** |
32 | 31 | |
33 | -## nextTaggedMessage | |
34 | - | |
35 | -[inbox.js:55-66](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/inbox.js#L55-L66 "Source code on GitHub") | |
36 | - | |
37 | -Waits for a message sent with a capablitly that has one of the given tags | |
38 | - | |
39 | -**Parameters** | |
40 | - | |
41 | -- `tags` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<any>** | |
42 | -- `timeout` **Integer** | |
43 | - | |
44 | -Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
45 | - | |
46 | 32 | ## nextMessage |
47 | 33 | |
48 | -[inbox.js:73-110](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/inbox.js#L73-L110 "Source code on GitHub") | |
34 | +[inbox.js:58-91](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/inbox.js#L58-L91 "Source code on GitHub") | |
49 | 35 | |
50 | 36 | Waits for the the next message if any |
51 | 37 | |
52 | 38 | **Parameters** |
53 | 39 | |
54 | -- `timeout` **Integer** (optional, default `0`) | |
40 | +- `timeout` **Integer** | |
55 | 41 | |
56 | -Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
42 | +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
docs/scheduler.md | ||
---|---|---|
@@ -11,74 +11,74 @@ | ||
11 | 11 | - [leastNumberOfTicks](#leastnumberofticks) |
12 | 12 | |
13 | 13 | ## constructor |
14 | 14 | |
15 | -[scheduler.js:14-20](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/scheduler.js#L14-L20 "Source code on GitHub") | |
15 | +[scheduler.js:13-17](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/scheduler.js#L13-L17 "Source code on GitHub") | |
16 | 16 | |
17 | 17 | The Scheduler manages the actor instances and tracks how many "ticks" they |
18 | 18 | have ran. |
19 | 19 | |
20 | 20 | ## lock |
21 | 21 | |
22 | -[scheduler.js:27-29](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/scheduler.js#L27-L29 "Source code on GitHub") | |
22 | +[scheduler.js:24-34](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/scheduler.js#L24-L34 "Source code on GitHub") | |
23 | 23 | |
24 | 24 | locks the scheduler from clearing waits untill the lock is resolved |
25 | 25 | |
26 | 26 | **Parameters** |
27 | 27 | |
28 | -- `id` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | |
28 | +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | |
29 | 29 | |
30 | -Returns **[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** the resolve function to call once it to unlock | |
30 | +Returns **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** the resolve function to call once it to unlock | |
31 | 31 | |
32 | 32 | ## update |
33 | 33 | |
34 | -[scheduler.js:35-40](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/scheduler.js#L35-L40 "Source code on GitHub") | |
34 | +[scheduler.js:40-44](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/scheduler.js#L40-L44 "Source code on GitHub") | |
35 | 35 | |
36 | 36 | updates an instance with a new tick count |
37 | 37 | |
38 | 38 | **Parameters** |
39 | 39 | |
40 | -- `instance` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** an actor instance | |
40 | +- `instance` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an actor instance | |
41 | 41 | |
42 | 42 | ## getInstance |
43 | 43 | |
44 | -[scheduler.js:52-54](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/scheduler.js#L52-L54 "Source code on GitHub") | |
44 | +[scheduler.js:56-59](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/scheduler.js#L56-L59 "Source code on GitHub") | |
45 | 45 | |
46 | 46 | returns an Actor instance |
47 | 47 | |
48 | 48 | **Parameters** |
49 | 49 | |
50 | -- `id` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | |
50 | +- `id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | |
51 | 51 | |
52 | -Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
52 | +Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
53 | 53 | |
54 | 54 | ## done |
55 | 55 | |
56 | -[scheduler.js:60-64](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/scheduler.js#L60-L64 "Source code on GitHub") | |
56 | +[scheduler.js:65-70](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/scheduler.js#L65-L70 "Source code on GitHub") | |
57 | 57 | |
58 | 58 | deletes an instance from the scheduler |
59 | 59 | |
60 | 60 | **Parameters** |
61 | 61 | |
62 | -- `id` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the containers id | |
62 | +- `id` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the containers id | |
63 | 63 | |
64 | 64 | ## wait |
65 | 65 | |
66 | -[scheduler.js:73-84](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/scheduler.js#L73-L84 "Source code on GitHub") | |
66 | +[scheduler.js:79-93](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/scheduler.js#L79-L93 "Source code on GitHub") | |
67 | 67 | |
68 | 68 | returns a promise that resolves once all containers have reached the given |
69 | 69 | number of ticks |
70 | 70 | |
71 | 71 | **Parameters** |
72 | 72 | |
73 | 73 | - `ticks` **interger** the number of ticks to wait |
74 | -- `id` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** optional id of the container that is waiting | |
74 | +- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** optional id of the container that is waiting | |
75 | 75 | |
76 | -Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
76 | +Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
77 | 77 | |
78 | 78 | ## leastNumberOfTicks |
79 | 79 | |
80 | -[scheduler.js:90-100](https://github.com/primea/js-primea-hypervisor/blob/3ae2283be27509914459ba5c6d1acd9f4cc59b8d/scheduler.js#L90-L100 "Source code on GitHub") | |
80 | +[scheduler.js:99-109](https://github.com/dfinity/js-primea/blob/3d3fc0d82dd65f14b8533dcd2fb881c9fbbb1bd3/scheduler.js#L99-L109 "Source code on GitHub") | |
81 | 81 | |
82 | 82 | returns the oldest container's ticks |
83 | 83 | |
84 | 84 | **Parameters** |
Built with git-ssb-web