Class: Log
Logs track a series of unique events that have occurred. Each event is tracked based on its unique id. The log only tracks the ids but currently does not track any details.
Logs can automatically be persisted by assigning them a bucket.
Hierarchy​
Evented
<"append"
|"truncate"
|"rollback"
|"clear"
|"change"
>↳
Log
Constructors​
constructor​
• new Log(options?
)
Parameters​
Name | Type |
---|---|
options | LogOptions |
Inherited from​
Evented<'append' | 'truncate' | 'rollback' | 'clear' | 'change'>.constructor
Defined in​
packages/@orbit/core/src/log.ts:33
Properties​
reified​
• reified: Promise
<void
>
Defined in​
packages/@orbit/core/src/log.ts:31
Accessors​
bucket​
• get
bucket(): undefined
| Bucket
<string
[]>
Returns​
undefined
| Bucket
<string
[]>
Defined in​
packages/@orbit/core/src/log.ts:48
entries​
• get
entries(): string
[]
Returns​
string
[]
Defined in​
packages/@orbit/core/src/log.ts:56
head​
• get
head(): string
Returns​
string
Defined in​
packages/@orbit/core/src/log.ts:52
length​
• get
length(): number
Returns​
number
Defined in​
packages/@orbit/core/src/log.ts:60
name​
• get
name(): undefined
| string
Returns​
undefined
| string
Defined in​
packages/@orbit/core/src/log.ts:44
Methods​
after​
â–¸ after(id
, relativePosition?
): string
[]
Parameters​
Name | Type | Default value |
---|---|---|
id | string | undefined |
relativePosition | number | 0 |
Returns​
string
[]
Defined in​
packages/@orbit/core/src/log.ts:89
append​
â–¸ append(...ids
): Promise
<void
>
Parameters​
Name | Type |
---|---|
...ids | string [] |
Returns​
Promise
<void
>
Defined in​
packages/@orbit/core/src/log.ts:64
before​
â–¸ before(id
, relativePosition?
): string
[]
Parameters​
Name | Type | Default value |
---|---|---|
id | string | undefined |
relativePosition | number | 0 |
Returns​
string
[]
Defined in​
packages/@orbit/core/src/log.ts:75
clear​
â–¸ clear(): Promise
<void
>
Returns​
Promise
<void
>
Defined in​
packages/@orbit/core/src/log.ts:158
contains​
â–¸ contains(id
): boolean
Parameters​
Name | Type |
---|---|
id | string |
Returns​
boolean
Defined in​
packages/@orbit/core/src/log.ts:170
emit​
â–¸ emit(event
, ...args
): void
Parameters​
Name | Type |
---|---|
event | Event |
...args | unknown [] |
Returns​
void
Inherited from​
Defined in​
packages/@orbit/core/src/evented.ts:29
listeners​
â–¸ listeners(event
): Listener
[]
Parameters​
Name | Type |
---|---|
event | Event |
Returns​
Listener
[]
Inherited from​
Defined in​
packages/@orbit/core/src/evented.ts:30
off​
â–¸ off(event
, listener?
): void
Parameters​
Name | Type |
---|---|
event | Event |
listener? | Listener |
Returns​
void
Inherited from​
Defined in​
packages/@orbit/core/src/evented.ts:27
on​
â–¸ on(event
, listener
): () => void
Parameters​
Name | Type |
---|---|
event | Event |
listener | Listener |
Returns​
fn
â–¸ (): void
Returns​
void
Inherited from​
Defined in​
packages/@orbit/core/src/evented.ts:26
one​
â–¸ one(event
, listener
): () => void
Parameters​
Name | Type |
---|---|
event | Event |
listener | Listener |
Returns​
fn
â–¸ (): void
Returns​
void
Inherited from​
Defined in​
packages/@orbit/core/src/evented.ts:28
rollback​
â–¸ rollback(id
, relativePosition?
): Promise
<void
>
Parameters​
Name | Type | Default value |
---|---|---|
id | string | undefined |
relativePosition | number | 0 |
Returns​
Promise
<void
>
Defined in​
packages/@orbit/core/src/log.ts:133
truncate​
â–¸ truncate(id
, relativePosition?
): Promise
<void
>
Parameters​
Name | Type | Default value |
---|---|---|
id | string | undefined |
relativePosition | number | 0 |
Returns​
Promise
<void
>