Skip to content
Source
Sign inSign up
TanStack/pacer
Open History to see the last commit

QueuerState.md

168 lines3.0 KB

1---
2id: QueuerState
3title: QueuerState
4---
5​
6Defined in: [queuer.ts:5](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L5)
7​
8## Type Parameters
9​
10### TValue
11​
12`TValue`
13​
14## Properties
15​
16### addItemCount
17​
18```ts
19addItemCount: number;
20```
21​
22Defined in: [queuer.ts:9](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L9)
23​
24Number of times addItem has been called (for reduction calculations)
25​
26***
27​
28### executionCount
29​
30```ts
31executionCount: number;
32```
33​
34Defined in: [queuer.ts:13](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L13)
35​
36Number of items that have been processed by the queuer
37​
38***
39​
40### expirationCount
41​
42```ts
43expirationCount: number;
44```
45​
46Defined in: [queuer.ts:17](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L17)
47​
48Number of items that have been removed from the queue due to expiration
49​
50***
51​
52### isEmpty
53​
54```ts
55isEmpty: boolean;
56```
57​
58Defined in: [queuer.ts:21](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L21)
59​
60Whether the queuer has no items to process (items array is empty)
61​
62***
63​
64### isFull
65​
66```ts
67isFull: boolean;
68```
69​
70Defined in: [queuer.ts:25](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L25)
71​
72Whether the queuer has reached its maximum capacity
73​
74***
75​
76### isIdle
77​
78```ts
79isIdle: boolean;
80```
81​
82Defined in: [queuer.ts:29](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L29)
83​
84Whether the queuer is not currently processing any items
85​
86***
87​
88### isRunning
89​
90```ts
91isRunning: boolean;
92```
93​
94Defined in: [queuer.ts:33](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L33)
95​
96Whether the queuer is active and will process items automatically
97​
98***
99​
100### items
101​
102```ts
103items: TValue[];
104```
105​
106Defined in: [queuer.ts:37](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L37)
107​
108Array of items currently waiting to be processed
109​
110***
111​
112### itemTimestamps
113​
114```ts
115itemTimestamps: number[];
116```
117​
118Defined in: [queuer.ts:41](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L41)
119​
120Timestamps when items were added to the queue for expiration tracking
121​
122***
123​
124### pendingTick
125​
126```ts
127pendingTick: boolean;
128```
129​
130Defined in: [queuer.ts:45](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L45)
131​
132Whether the queuer has a pending timeout for processing the next item
133​
134***
135​
136### rejectionCount
137​
138```ts
139rejectionCount: number;
140```
141​
142Defined in: [queuer.ts:49](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L49)
143​
144Number of items that have been rejected from being added to the queue
145​
146***
147​
148### size
149​
150```ts
151size: number;
152```
153​
154Defined in: [queuer.ts:53](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L53)
155​
156Number of items currently in the queue
157​
158***
159​
160### status
161​
162```ts
163status: "idle" | "running" | "stopped";
164```
165​
166Defined in: [queuer.ts:57](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L57)
167​
168Current processing status - 'idle' when not processing, 'running' when active, 'stopped' when paused