UNPKG

1.56 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var IncomingShuffleState_1 = require("./IncomingShuffleState");
4var OutgoingShuffleState_1 = require("./OutgoingShuffleState");
5var ShuffleStateFactory = /** @class */ (function () {
6 function ShuffleStateFactory(logger, asyncExecService) {
7 this.logger = logger;
8 this.asyncExecService = asyncExecService;
9 }
10 /**
11 * Create a new outgoing shuffle state
12 *
13 * @param localNode The local Cyclon node
14 * @param destinationNodePointer The pointer to the destination node
15 * @param shuffleSet The set of node pointers to send in the request
16 * @returns {OutgoingShuffleState}
17 */
18 ShuffleStateFactory.prototype.createOutgoingShuffleState = function (localNode, destinationNodePointer, shuffleSet) {
19 return new OutgoingShuffleState_1.OutgoingShuffleState(localNode, destinationNodePointer, shuffleSet, this.asyncExecService, this.logger);
20 };
21 /**
22 * Create a new incoming shuffle state
23 *
24 * @param localNode The local Cyclon node
25 * @param sourcePointer The source peer's node pointer
26 * @returns {IncomingShuffleState}
27 */
28 ShuffleStateFactory.prototype.createIncomingShuffleState = function (localNode, sourcePointer) {
29 return new IncomingShuffleState_1.IncomingShuffleState(localNode, sourcePointer, this.asyncExecService, this.logger);
30 };
31 return ShuffleStateFactory;
32}());
33exports.ShuffleStateFactory = ShuffleStateFactory;
34//# sourceMappingURL=ShuffleStateFactory.js.map
\No newline at end of file