Commit a3adeae363747c55b468a017123cfbb88630f134
rename kernel -> actor
wanderer committed on 11/21/2017, 9:23:33 PMParent: 3df38a0c09431767d73e05b496833e907b6826ff
Files changed
README.md | changed |
index.js | changed |
package.json | changed |
README.md | ||
---|---|---|
@@ -7,5 +7,7 @@ | ||
7 | 7 … | # INSTALL |
8 | 8 … | clone and run `npm install` |
9 | 9 … | |
10 | 10 … | # LICENSE |
11 | -[MPL-2.0](https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)) | |
11 … | +[MPL-2.0][LICENSE] | |
12 … | + | |
13 … | +[LICENSE]: https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2) |
index.js | |||
---|---|---|---|
@@ -1,9 +1,9 @@ | |||
1 | 1 … | module.exports = class AbstractContainer { | |
2 | - // The constructor is given an instance of the kernel | ||
3 | - // https://github.com/primea/js-primea-hypervisor/blob/master/docs/kernel.md | ||
4 | - constructor (kernel) { | ||
5 | - this.kernel = kernel | ||
2 … | + // The constructor is given an instance of the actor | ||
3 … | + // https://github.com/primea/js-primea-hypervisor/blob/master/docs/actor.md | ||
4 … | + constructor (actor) { | ||
5 … | + this.actor = actor | ||
6 | 6 … | } | |
7 | 7 … | ||
8 | 8 … | // This method runs once when the container is initially created. | |
9 | 9 … | // | |
@@ -20,9 +20,8 @@ | |||
20 | 20 … | // was requested in onIdle. | |
21 | 21 … | async onStartup () {} | |
22 | 22 … | ||
23 | 23 … | // This is called for each incoming message the container gets. | |
24 | - // | ||
25 | 24 … | // Optionally it can return a single value. | |
26 | 25 … | async onMessage (message) { | |
27 | 26 … | throw new Error('Unimplemented message: ' + message.data) | |
28 | 27 … | } | |
@@ -31,13 +30,13 @@ | |||
31 | 30 … | // in the incoming queue for the container to receive. | |
32 | 31 … | // | |
33 | 32 … | // This can be overriden by a subclass. | |
34 | 33 … | onIdle () { | |
35 | - // This tells the kernel that it is safe to freeze (aka turn off) this container. | ||
34 … | + // This tells the actor that it is safe to freeze (aka turn off) this container. | ||
36 | 35 … | // This removes all references in memory and the next time this instance is | |
37 | 36 … | // requested it has to be deserialised from storage and spinned up. This can be | |
38 | 37 … | // a time consuming operation. | |
39 | - this.kernel.shutdown() | ||
38 … | + this.actor.shutdown() | ||
40 | 39 … | } | |
41 | 40 … | ||
42 | 41 … | // each container type used in a hypervisor instance must have a different | |
43 | 42 … | // id defined as an interger. This can be overriden at the time the container is registered with the hypervisor. |
Built with git-ssb-web