1 |
|
2 | import { EventEmitter } from 'events';
|
3 | import { Operation } from './Operation';
|
4 |
|
5 |
|
6 |
|
7 | export declare class OperationQueue extends EventEmitter {
|
8 | map: Object;
|
9 | operations: Operation<any>[];
|
10 | resolve: Function;
|
11 | reject: Function;
|
12 | completionCallback: Function;
|
13 | maximumConcurrentOperations: number;
|
14 | readyQueueMap: Object;
|
15 | readyQueue: Object;
|
16 | runningQueueMap: Object;
|
17 | runningQueue: Operation<any>[];
|
18 | queues: Object;
|
19 | promise: Promise<any>;
|
20 | private _paused;
|
21 | private _processedOperations;
|
22 | constructor();
|
23 | /**
|
24 | * Getter
|
25 | * @returns {boolean}
|
26 | */
|
27 | get isExecuting(): boolean;
|
28 | |
29 |
|
30 |
|
31 | done(): void;
|
32 | |
33 |
|
34 |
|
35 | addOperation(operation: Operation<any>): Promise<any>;
|
36 | |
37 |
|
38 |
|
39 | addOperations(operations: Operation<any>[]): Promise<any>;
|
40 | |
41 |
|
42 |
|
43 | pause(): void;
|
44 | |
45 |
|
46 |
|
47 | resume(): void;
|
48 | |
49 |
|
50 |
|
51 |
|
52 | get isPaused(): boolean;
|
53 | private _preProcessOperations;
|
54 | private _bindOperation;
|
55 | private _unbindOperation;
|
56 | private _begin;
|
57 | private _startOperations;
|
58 | private _startOperation;
|
59 | private _onOperationStart;
|
60 | private _onOperationReady;
|
61 | private _onOperationDone;
|
62 | private _checkNextOperation;
|
63 | |
64 |
|
65 |
|
66 | hasOperations(): boolean;
|
67 | |
68 |
|
69 |
|
70 |
|
71 |
|
72 | getNextOperation(): Operation<any>;
|
73 | private _onOperationCancel;
|
74 | }
|