mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 21:28:12 +00:00
[Persistence] Rename bundle
Rename bundle for queued persistence. WTD-1033.
This commit is contained in:
57
platform/persistence/queue/src/PersistenceQueue.js
Normal file
57
platform/persistence/queue/src/PersistenceQueue.js
Normal file
@ -0,0 +1,57 @@
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[
|
||||
'./PersistenceQueueImpl',
|
||||
'./PersistenceQueueHandler',
|
||||
'./PersistenceFailureHandler'
|
||||
],
|
||||
function (
|
||||
PersistenceQueueImpl,
|
||||
PersistenceQueueHandler,
|
||||
PersistenceFailureHandler
|
||||
) {
|
||||
"use strict";
|
||||
|
||||
|
||||
/**
|
||||
* The PersistenceQueue is used by the QueuingPersistenceCapability
|
||||
* to aggregrate calls for object persistence. These are then issued
|
||||
* in a group, such that if some or all are rejected, this result can
|
||||
* be shown to the user (again, in a group.)
|
||||
*
|
||||
* This constructor is exposed as a service, but handles only the
|
||||
* wiring of injected dependencies; behavior is implemented in the
|
||||
* various component parts.
|
||||
*
|
||||
* @param $timeout Angular's $timeout
|
||||
* @param {PersistenceQueueHandler} handler handles actual
|
||||
* persistence when the queue is flushed
|
||||
* @param {number} [DELAY] optional; delay in milliseconds between
|
||||
* attempts to flush the queue
|
||||
*/
|
||||
function PersistenceQueue(
|
||||
$q,
|
||||
$timeout,
|
||||
dialogService,
|
||||
persistenceService,
|
||||
PERSISTENCE_QUEUE_DELAY
|
||||
) {
|
||||
// Wire up injected dependencies
|
||||
return new PersistenceQueueImpl(
|
||||
$timeout,
|
||||
new PersistenceQueueHandler(
|
||||
$q,
|
||||
new PersistenceFailureHandler(
|
||||
$q,
|
||||
dialogService,
|
||||
persistenceService
|
||||
)
|
||||
),
|
||||
PERSISTENCE_QUEUE_DELAY
|
||||
);
|
||||
}
|
||||
|
||||
return PersistenceQueue;
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user