@vrtmrz/livesync-commonlib 0.1.19-rc.0 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/common/models/setting.p2p.d.ts +2 -0
- package/dist/common/models/setting.p2p.js +5 -0
- package/dist/interfaces/ServiceModule.d.ts +13 -4
- package/dist/managers/ChunkFetcher.js +10 -0
- package/dist/p2p/P2PService.d.ts +123 -0
- package/dist/p2p/P2PService.js +271 -0
- package/dist/p2p/index.d.ts +8 -0
- package/dist/p2p/index.js +8 -0
- package/dist/pouchdb/LiveSyncLocalDB.d.ts +3 -0
- package/dist/pouchdb/LiveSyncLocalDB.js +23 -3
- package/dist/pouchdb/ReplicatorShim.d.ts +43 -4
- package/dist/pouchdb/ReplicatorShim.js +78 -5
- package/dist/replication/CentralCompatibility.d.ts +38 -0
- package/dist/replication/CentralCompatibility.js +39 -0
- package/dist/replication/CentralRemoteAdministration.d.ts +84 -0
- package/dist/replication/CentralRemoteAdministration.js +71 -0
- package/dist/replication/LiveSyncAbstractReplicator.d.ts +19 -6
- package/dist/replication/ProviderCapability.d.ts +32 -0
- package/dist/replication/ProviderCapability.js +27 -0
- package/dist/replication/RemoteResource.d.ts +85 -0
- package/dist/replication/RemoteResource.js +17 -0
- package/dist/replication/ReplicatorInstance.d.ts +23 -0
- package/dist/replication/ReplicatorProvider.d.ts +249 -0
- package/dist/replication/ReplicatorProvider.js +145 -0
- package/dist/replication/couchdb/LiveSyncReplicator.d.ts +54 -8
- package/dist/replication/couchdb/LiveSyncReplicator.js +411 -158
- package/dist/replication/index.d.ts +10 -0
- package/dist/replication/index.js +70 -0
- package/dist/replication/journal/JournalSyncCore.d.ts +2 -0
- package/dist/replication/journal/JournalSyncCore.js +18 -5
- package/dist/replication/journal/LiveSyncJournalReplicator.d.ts +38 -10
- package/dist/replication/journal/LiveSyncJournalReplicator.js +271 -63
- package/dist/replication/journal/LiveSyncJournalReplicatorEnv.d.ts +8 -0
- package/dist/replication/journal/objectstore/JournalStorageAdapter.d.ts +2 -0
- package/dist/replication/journal/objectstore/MinioStorageAdapter.d.ts +2 -0
- package/dist/replication/journal/objectstore/MinioStorageAdapter.js +10 -1
- package/dist/replication/trystero/LiveSyncTrysteroReplicator.d.ts +12 -40
- package/dist/replication/trystero/LiveSyncTrysteroReplicator.js +52 -152
- package/dist/replication/trystero/P2PAutomationCoordinator.d.ts +20 -0
- package/dist/replication/trystero/P2PAutomationCoordinator.js +43 -0
- package/dist/replication/trystero/P2PConnectionProbeAdmission.d.ts +32 -0
- package/dist/replication/trystero/P2PConnectionProbeAdmission.js +10 -0
- package/dist/replication/trystero/P2PReplicationWire.d.ts +31 -0
- package/dist/replication/trystero/P2PReplicationWire.js +50 -0
- package/dist/replication/trystero/P2PRoomSession.d.ts +32 -0
- package/dist/replication/trystero/P2PRoomSession.js +101 -0
- package/dist/replication/trystero/P2PRoomSessionOwner.d.ts +61 -0
- package/dist/replication/trystero/P2PRoomSessionOwner.js +249 -0
- package/dist/replication/trystero/TrysteroReplicator.d.ts +88 -36
- package/dist/replication/trystero/TrysteroReplicator.js +273 -113
- package/dist/replication/trystero/TrysteroReplicatorP2PClient.d.ts +7 -4
- package/dist/replication/trystero/TrysteroReplicatorP2PClient.js +21 -14
- package/dist/replication/trystero/TrysteroReplicatorP2PServer.d.ts +26 -3
- package/dist/replication/trystero/TrysteroReplicatorP2PServer.js +84 -39
- package/dist/replication/trystero/UseP2PReplicatorResult.d.ts +10 -6
- package/dist/replication/trystero/addP2PEventHandlers.d.ts +8 -12
- package/dist/replication/trystero/addP2PEventHandlers.js +19 -19
- package/dist/replication/trystero/p2pReplicatorConfigurationIdentity.d.ts +9 -0
- package/dist/replication/trystero/p2pReplicatorConfigurationIdentity.js +30 -0
- package/dist/replication/trystero/types.d.ts +18 -0
- package/dist/replication/trystero/types.js +5 -1
- package/dist/replication/trystero/useP2PReplicatorCommands.d.ts +3 -3
- package/dist/replication/trystero/useP2PReplicatorCommands.js +6 -8
- package/dist/replication/trystero/useP2PReplicatorFeature.d.ts +16 -7
- package/dist/replication/trystero/useP2PReplicatorFeature.js +72 -55
- package/dist/rpc/RpcRoom.d.ts +15 -1
- package/dist/rpc/RpcRoom.js +176 -41
- package/dist/rpc/RpcSession.d.ts +3 -1
- package/dist/rpc/RpcSession.js +2 -2
- package/dist/rpc/index.d.ts +1 -1
- package/dist/rpc/transports/trysteroUtils.js +2 -1
- package/dist/rpc/types.d.ts +26 -1
- package/dist/serviceFeatures/checkRemoteSize.js +5 -2
- package/dist/serviceModules/Rebuilder.js +66 -56
- package/dist/services/base/AppLifecycleService.d.ts +4 -0
- package/dist/services/base/AppLifecycleService.js +4 -0
- package/dist/services/base/ControlService.js +0 -4
- package/dist/services/base/DatabaseEventService.js +1 -1
- package/dist/services/base/IService.d.ts +105 -8
- package/dist/services/base/ReadinessEvaluator.d.ts +40 -0
- package/dist/services/base/ReadinessEvaluator.js +16 -0
- package/dist/services/base/RemoteConnection.d.ts +3 -0
- package/dist/services/base/RemoteService.js +2 -2
- package/dist/services/base/ReplicationService.d.ts +45 -10
- package/dist/services/base/ReplicationService.js +248 -91
- package/dist/services/base/ReplicationService.readiness.d.ts +52 -0
- package/dist/services/base/ReplicationService.readiness.js +87 -0
- package/dist/services/base/ReplicationService.typedReplication.d.ts +83 -0
- package/dist/services/base/ReplicationService.typedReplication.js +191 -0
- package/dist/services/base/ReplicatorService.activeReplicatorState.d.ts +47 -0
- package/dist/services/base/ReplicatorService.activeReplicatorState.js +107 -0
- package/dist/services/base/ReplicatorService.centralRemoteAdministration.d.ts +5 -0
- package/dist/services/base/ReplicatorService.centralRemoteAdministration.js +44 -0
- package/dist/services/base/ReplicatorService.d.ts +75 -14
- package/dist/services/base/ReplicatorService.js +232 -53
- package/dist/services/base/ReplicatorService.remoteResourceResolver.d.ts +4 -0
- package/dist/services/base/ReplicatorService.remoteResourceResolver.js +11 -0
- package/dist/services/base/TweakValueService.d.ts +3 -2
- package/dist/services/implements/injectable/InjectableTweakValueService.d.ts +1 -1
- package/dist/services/lib/HandlerUtils.d.ts +24 -0
- package/dist/services/lib/HandlerUtils.js +40 -0
- package/docs/development.md +40 -7
- package/docs/p2p-transport-lifecycle.md +135 -11
- package/docs/proven-in-use.md +5 -1
- package/docs/remote-configurations.md +4 -0
- package/docs/service-feature-composition.md +250 -0
- package/package.json +17 -1
- package/dist/replication/trystero/P2PReplicatorBase.d.ts +0 -19
- package/dist/replication/trystero/P2PReplicatorCore.d.ts +0 -8
- package/dist/replication/trystero/P2PReplicatorCore.js +0 -56
- package/dist/replication/trystero/TrysteroReplicatorP2PConnection.d.ts +0 -2
- package/dist/replication/trystero/TrysteroReplicatorP2PConnection.js +0 -4
- /package/dist/replication/{trystero/P2PReplicatorBase.js → ReplicatorInstance.js} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { CAPABILITY_NOT_APPLICABLE, CAPABILITY_NOT_IMPLEMENTED, CENTRAL_REMOTE_REPLICATION_READINESS, NO_INTERACTION, PEER_REPLICATION_READINESS, REPLICATION_CANCELLED, REPLICATION_COMPLETED, USER_INITIATED_REPLICATION_AUTHORITY, defineReplicatorProviderDefinitions, isReplicationCompleted, outcomeFromContinuousOpenReplication, outcomeFromFiniteOpenReplication, replicationBlocked, replicationFailed, supportedOpenReplicationContinuous, supportedOpenReplicationOneShot, supportedOpenReplicationUnattended, supportedStopActiveTransfer, supportedCapability, } from "./ReplicatorProvider.js";
|
|
2
|
+
export type { ReplicatorInstance } from "./ReplicatorInstance.js";
|
|
3
|
+
export type { ActiveReplicatorContext, CapabilitySupport, ContinuousReplicationRequest, ContinuousReplicationTrigger, ContinuousRunner, InteractionAuthority, InteractionPermissions, NotApplicableCapability, NotImplementedCapability, NoInteraction, PermittedInteractionPermissions, ReplicationBlockReason, ReplicationAttemptFailure, ReplicationCancelled, ReplicationCompleted, ReplicationFailed, ReplicationInteraction, ReplicationOutcome, ReplicationReadinessRequirements, ReplicationPartial, ReplicationFailureRequest, ReplicatorConfigurationIdentity, ReplicatorProviderDefinition, ReplicatorProviderDefinitionMap, StopActiveTransferRunner, SupportedCapability, UnattendedOneShotRequest, UnattendedReplicationTrigger, UnattendedOneShotRunner, UserInitiatedOneShotRequest, UserInitiatedReplicationAuthority, UserInitiatedOneShotRunner, } from "./ReplicatorProvider.js";
|
|
4
|
+
export { CAPABILITY_SUPPORT_KINDS, CAPABILITY_UNAVAILABLE_REASONS } from "./ProviderCapability.js";
|
|
5
|
+
export { NO_REMOTE_RESOURCE_CAPABILITIES, REMOTE_RESOURCE_KINDS } from "./RemoteResource.js";
|
|
6
|
+
export type { ConnectionProbeFactory, PreferredTweakProbe, PreferredTweakProbeFactory, RemoteConnectionProbe, RemoteConnectionProbeOptions, RemoteConnectionProbeResult, RemoteResourceCapabilities, RemoteResourceFactoryMap, RemoteResourceKind, RemoteResourceMap, SecuritySeedResource, SecuritySeedResourceFactory, SynchronisationInformationResource, SynchronisationInformationResourceFactory, } from "./RemoteResource.js";
|
|
7
|
+
export { CENTRAL_REMOTE_ADMINISTRATION_ACTIONS, CENTRAL_REMOTE_ADMINISTRATION_FAILURE_REASONS, CENTRAL_REMOTE_ADMINISTRATION_OBSERVATION_KINDS, CENTRAL_REMOTE_ADMINISTRATION_RESULT_STATUSES, applyCentralRemoteAdministrationMutation, isCentralRemoteAdministrationVerified, milestoneSatisfiesCentralRemoteAdministration, centralRemoteAdministrationVerificationFailed, centralRemoteAdministrationVerified, } from "./CentralRemoteAdministration.js";
|
|
8
|
+
export type { MilestoneCentralRemoteAdministrationObservation, CentralRemoteAdministrationAction, CentralRemoteAdministrationFailureReason, CentralRemoteAdministrationObservation, CentralRemoteAdministrationRequest, CentralRemoteAdministrationReplicator, CentralRemoteAdministrationResult, CentralRemoteAdministrationRunner, CentralRemoteAdministrationVerificationFailed, CentralRemoteAdministrationVerified, } from "./CentralRemoteAdministration.js";
|
|
9
|
+
export { CENTRAL_COMPATIBILITY_REJECTION_REASONS } from "./CentralCompatibility.js";
|
|
10
|
+
export type { CentralCompatibilityRecoveryHint, CentralCompatibilityRejectionReason } from "./CentralCompatibility.js";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CAPABILITY_NOT_APPLICABLE,
|
|
3
|
+
CAPABILITY_NOT_IMPLEMENTED,
|
|
4
|
+
CENTRAL_REMOTE_REPLICATION_READINESS,
|
|
5
|
+
NO_INTERACTION,
|
|
6
|
+
PEER_REPLICATION_READINESS,
|
|
7
|
+
REPLICATION_CANCELLED,
|
|
8
|
+
REPLICATION_COMPLETED,
|
|
9
|
+
USER_INITIATED_REPLICATION_AUTHORITY,
|
|
10
|
+
defineReplicatorProviderDefinitions,
|
|
11
|
+
isReplicationCompleted,
|
|
12
|
+
outcomeFromContinuousOpenReplication,
|
|
13
|
+
outcomeFromFiniteOpenReplication,
|
|
14
|
+
replicationBlocked,
|
|
15
|
+
replicationFailed,
|
|
16
|
+
supportedOpenReplicationContinuous,
|
|
17
|
+
supportedOpenReplicationOneShot,
|
|
18
|
+
supportedOpenReplicationUnattended,
|
|
19
|
+
supportedStopActiveTransfer,
|
|
20
|
+
supportedCapability
|
|
21
|
+
} from "./ReplicatorProvider.js";
|
|
22
|
+
import { CAPABILITY_SUPPORT_KINDS, CAPABILITY_UNAVAILABLE_REASONS } from "./ProviderCapability.js";
|
|
23
|
+
import { NO_REMOTE_RESOURCE_CAPABILITIES, REMOTE_RESOURCE_KINDS } from "./RemoteResource.js";
|
|
24
|
+
import {
|
|
25
|
+
CENTRAL_REMOTE_ADMINISTRATION_ACTIONS,
|
|
26
|
+
CENTRAL_REMOTE_ADMINISTRATION_FAILURE_REASONS,
|
|
27
|
+
CENTRAL_REMOTE_ADMINISTRATION_OBSERVATION_KINDS,
|
|
28
|
+
CENTRAL_REMOTE_ADMINISTRATION_RESULT_STATUSES,
|
|
29
|
+
applyCentralRemoteAdministrationMutation,
|
|
30
|
+
isCentralRemoteAdministrationVerified,
|
|
31
|
+
milestoneSatisfiesCentralRemoteAdministration,
|
|
32
|
+
centralRemoteAdministrationVerificationFailed,
|
|
33
|
+
centralRemoteAdministrationVerified
|
|
34
|
+
} from "./CentralRemoteAdministration.js";
|
|
35
|
+
import { CENTRAL_COMPATIBILITY_REJECTION_REASONS } from "./CentralCompatibility.js";
|
|
36
|
+
export {
|
|
37
|
+
CAPABILITY_NOT_APPLICABLE,
|
|
38
|
+
CAPABILITY_NOT_IMPLEMENTED,
|
|
39
|
+
CAPABILITY_SUPPORT_KINDS,
|
|
40
|
+
CAPABILITY_UNAVAILABLE_REASONS,
|
|
41
|
+
CENTRAL_COMPATIBILITY_REJECTION_REASONS,
|
|
42
|
+
CENTRAL_REMOTE_ADMINISTRATION_ACTIONS,
|
|
43
|
+
CENTRAL_REMOTE_ADMINISTRATION_FAILURE_REASONS,
|
|
44
|
+
CENTRAL_REMOTE_ADMINISTRATION_OBSERVATION_KINDS,
|
|
45
|
+
CENTRAL_REMOTE_ADMINISTRATION_RESULT_STATUSES,
|
|
46
|
+
CENTRAL_REMOTE_REPLICATION_READINESS,
|
|
47
|
+
NO_INTERACTION,
|
|
48
|
+
NO_REMOTE_RESOURCE_CAPABILITIES,
|
|
49
|
+
PEER_REPLICATION_READINESS,
|
|
50
|
+
REMOTE_RESOURCE_KINDS,
|
|
51
|
+
REPLICATION_CANCELLED,
|
|
52
|
+
REPLICATION_COMPLETED,
|
|
53
|
+
USER_INITIATED_REPLICATION_AUTHORITY,
|
|
54
|
+
applyCentralRemoteAdministrationMutation,
|
|
55
|
+
centralRemoteAdministrationVerificationFailed,
|
|
56
|
+
centralRemoteAdministrationVerified,
|
|
57
|
+
defineReplicatorProviderDefinitions,
|
|
58
|
+
isCentralRemoteAdministrationVerified,
|
|
59
|
+
isReplicationCompleted,
|
|
60
|
+
milestoneSatisfiesCentralRemoteAdministration,
|
|
61
|
+
outcomeFromContinuousOpenReplication,
|
|
62
|
+
outcomeFromFiniteOpenReplication,
|
|
63
|
+
replicationBlocked,
|
|
64
|
+
replicationFailed,
|
|
65
|
+
supportedCapability,
|
|
66
|
+
supportedOpenReplicationContinuous,
|
|
67
|
+
supportedOpenReplicationOneShot,
|
|
68
|
+
supportedOpenReplicationUnattended,
|
|
69
|
+
supportedStopActiveTransfer
|
|
70
|
+
};
|
|
@@ -67,5 +67,7 @@ export declare class JournalSyncCore {
|
|
|
67
67
|
receiveRemoteJournal(showMessage?: boolean): Promise<boolean>;
|
|
68
68
|
sync(showResult?: boolean): Promise<boolean>;
|
|
69
69
|
requestStop(): void;
|
|
70
|
+
/** Stop this Journal operation owner and release its storage transport. */
|
|
71
|
+
dispose(): void;
|
|
70
72
|
}
|
|
71
73
|
export {};
|
|
@@ -70,11 +70,14 @@ class JournalSyncCore {
|
|
|
70
70
|
}
|
|
71
71
|
async getSyncParameters() {
|
|
72
72
|
try {
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
73
|
+
const result = await this.storage.downloadWithResult(DOCID_JOURNAL_SYNC_PARAMETERS, true);
|
|
74
|
+
if (result.status === JournalStorageReadStatuses.NOT_FOUND) {
|
|
75
75
|
throw new SyncParamsNotFoundError(`Missing sync parameters`);
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
if (result.status === JournalStorageReadStatuses.UNAVAILABLE) {
|
|
78
|
+
throw SyncParamsFetchError.fromError(result.error);
|
|
79
|
+
}
|
|
80
|
+
const downloadedSyncParams = JSON.parse(new TextDecoder().decode(result.value));
|
|
78
81
|
return downloadedSyncParams;
|
|
79
82
|
} catch (ex) {
|
|
80
83
|
Logger(`Could not retrieve remote sync parameters`, LOG_LEVEL_INFO);
|
|
@@ -262,19 +265,24 @@ class JournalSyncCore {
|
|
|
262
265
|
if (files.length == 0) {
|
|
263
266
|
break;
|
|
264
267
|
}
|
|
265
|
-
await this.storage.deleteFiles(files)
|
|
268
|
+
if (!await this.storage.deleteFiles(files)) {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
266
271
|
} while (files.length != 0);
|
|
267
272
|
clearHandlers();
|
|
268
273
|
} catch (ex) {
|
|
269
274
|
Logger(`WARNING! Could not delete files.`, LOG_LEVEL_NOTICE, "reset-bucket");
|
|
270
275
|
Logger(ex, LOG_LEVEL_VERBOSE);
|
|
276
|
+
return false;
|
|
271
277
|
}
|
|
272
278
|
const journals = await this._getRemoteJournals();
|
|
273
279
|
if (journals.length == 0) {
|
|
274
280
|
Logger("Nothing to delete!", LOG_LEVEL_NOTICE);
|
|
275
281
|
return true;
|
|
276
282
|
}
|
|
277
|
-
await this.storage.deleteFiles(journals)
|
|
283
|
+
if (!await this.storage.deleteFiles(journals)) {
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
278
286
|
Logger(`${journals.length} items has been deleted!`, LOG_LEVEL_NOTICE);
|
|
279
287
|
await this.resetCheckpointInfo();
|
|
280
288
|
return true;
|
|
@@ -751,6 +759,11 @@ class JournalSyncCore {
|
|
|
751
759
|
requestStop() {
|
|
752
760
|
this.requestedStop = true;
|
|
753
761
|
}
|
|
762
|
+
/** Stop this Journal operation owner and release its storage transport. */
|
|
763
|
+
dispose() {
|
|
764
|
+
this.requestStop();
|
|
765
|
+
this.storage.dispose?.();
|
|
766
|
+
}
|
|
754
767
|
}
|
|
755
768
|
export {
|
|
756
769
|
JournalSyncCore
|
|
@@ -1,26 +1,55 @@
|
|
|
1
|
-
import { type RemoteDBSettings, type
|
|
1
|
+
import { type RemoteDBSettings, type ChunkVersionRange, type NodeData, type RemotePreferredTweakResult } from "../../common/types.js";
|
|
2
2
|
import { JournalSyncCore } from "./JournalSyncCore.js";
|
|
3
3
|
import { LiveSyncAbstractReplicator, type RemoteDBStatus } from "../LiveSyncAbstractReplicator.js";
|
|
4
4
|
import { type ENSURE_DB_RESULT } from "../../pouchdb/LiveSyncDBFunctions.js";
|
|
5
5
|
import type { CheckPointInfo } from "./JournalSyncTypes.js";
|
|
6
6
|
import type { SimpleStore } from "../../common/utils.js";
|
|
7
7
|
import type { LiveSyncJournalReplicatorEnv } from "./LiveSyncJournalReplicatorEnv.js";
|
|
8
|
+
import { type CentralCompatibilityDecisionRecorder } from "../CentralCompatibility.js";
|
|
9
|
+
import { type ReplicationOutcome } from "../ReplicatorProvider.js";
|
|
8
10
|
export declare class LiveSyncJournalReplicator extends LiveSyncAbstractReplicator {
|
|
9
11
|
env: LiveSyncJournalReplicatorEnv;
|
|
10
12
|
get client(): JournalSyncCore;
|
|
11
13
|
get simpleStore(): SimpleStore<CheckPointInfo>;
|
|
12
|
-
_client
|
|
14
|
+
_client?: JournalSyncCore;
|
|
15
|
+
/** Whether this instance has entered a Journal transfer since its last close. */
|
|
16
|
+
private hasEnteredReplication;
|
|
17
|
+
/** Transfers whose settlement must be observed by an admitted Stop request. */
|
|
18
|
+
private activeJournalTransfers?;
|
|
19
|
+
/** Shared settlement for repeated Stop requests at the same boundary. */
|
|
20
|
+
private journalTransferStopSettlement?;
|
|
21
|
+
/** Monotonic fence which prevents a preflight crossing a later Stop boundary. */
|
|
22
|
+
private journalTransferStopGeneration;
|
|
13
23
|
getReplicationPBKDF2Salt(setting: RemoteDBSettings, refresh?: boolean): Promise<Uint8Array<ArrayBuffer>>;
|
|
14
|
-
setupJournalSyncClient(): JournalSyncCore;
|
|
15
|
-
ensureBucketIsCompatible(deviceNodeID: string, currentVersionRange: ChunkVersionRange): Promise<ENSURE_DB_RESULT>;
|
|
24
|
+
setupJournalSyncClient(settings?: RemoteDBSettings): JournalSyncCore;
|
|
25
|
+
ensureBucketIsCompatible(deviceNodeID: string, currentVersionRange: ChunkVersionRange, setting?: RemoteDBSettings, client?: Pick<JournalSyncCore, "downloadJsonWithResult" | "getCheckpointInfo" | "uploadJson">): Promise<ENSURE_DB_RESULT>;
|
|
16
26
|
constructor(env: LiveSyncJournalReplicatorEnv);
|
|
17
27
|
migrate(from: number, to: number): Promise<boolean>;
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Run one Replicator-owned Journal transfer after any earlier Stop boundary.
|
|
30
|
+
*
|
|
31
|
+
* The client owns transfer mechanics, while this Replicator owns the
|
|
32
|
+
* settlement required by its active-transfer cancellation contract.
|
|
33
|
+
*/
|
|
34
|
+
private runJournalTransfer;
|
|
35
|
+
/** Request client cancellation and await the transfers admitted before this Stop boundary. */
|
|
36
|
+
terminateSync(): Promise<void>;
|
|
37
|
+
openReplication(setting: RemoteDBSettings, _: boolean, showResult: boolean, ignoreCleanLock?: boolean, recordCompatibilityDecision?: CentralCompatibilityDecisionRecorder): Promise<boolean>;
|
|
38
|
+
/**
|
|
39
|
+
* Run one finite Journal attempt against one settings-bound borrowed client.
|
|
40
|
+
*
|
|
41
|
+
* Only a rejection observed by this attempt is projected into recovery;
|
|
42
|
+
* unavailable storage and later transport failures do not reuse old state.
|
|
43
|
+
*/
|
|
44
|
+
openOneShotReplicationWithOutcome(setting: RemoteDBSettings, showResult: boolean, ignoreCleanLock?: boolean): Promise<ReplicationOutcome>;
|
|
45
|
+
private runDirectionalReplication;
|
|
46
|
+
/** Capture only the compatibility decision made by this exact borrowed client. */
|
|
47
|
+
private runDirectionalReplicationWithOutcome;
|
|
20
48
|
replicateAllToServer(setting: RemoteDBSettings, showingNotice?: boolean): Promise<boolean>;
|
|
49
|
+
replicateAllToServerWithOutcome(setting: RemoteDBSettings, showingNotice?: boolean): Promise<ReplicationOutcome>;
|
|
21
50
|
replicateAllFromServer(setting: RemoteDBSettings, showingNotice?: boolean): Promise<boolean>;
|
|
22
|
-
|
|
23
|
-
|
|
51
|
+
replicateAllFromServerWithOutcome(setting: RemoteDBSettings, showingNotice?: boolean): Promise<ReplicationOutcome>;
|
|
52
|
+
checkReplicationConnectivity(skipCheck: boolean, ignoreCleanLock?: boolean, showMessage?: boolean, setting?: RemoteDBSettings, client?: JournalSyncCore, recordCompatibilityDecision?: CentralCompatibilityDecisionRecorder): Promise<boolean>;
|
|
24
53
|
closeReplication(): void;
|
|
25
54
|
tryResetRemoteDatabase(setting: RemoteDBSettings): Promise<void>;
|
|
26
55
|
tryCreateRemoteDatabase(setting: RemoteDBSettings): Promise<void>;
|
|
@@ -29,9 +58,8 @@ export declare class LiveSyncJournalReplicator extends LiveSyncAbstractReplicato
|
|
|
29
58
|
tryConnectRemote(setting: RemoteDBSettings, showResult?: boolean): Promise<boolean>;
|
|
30
59
|
resetRemoteTweakSettings(setting: RemoteDBSettings): Promise<void>;
|
|
31
60
|
setPreferredRemoteTweakSettings(setting: RemoteDBSettings): Promise<void>;
|
|
32
|
-
getRemotePreferredTweakValues(
|
|
61
|
+
getRemotePreferredTweakValues(setting: RemoteDBSettings): Promise<RemotePreferredTweakResult>;
|
|
33
62
|
getRemoteStatus(setting: RemoteDBSettings): Promise<false | RemoteDBStatus>;
|
|
34
|
-
countCompromisedChunks(): Promise<number>;
|
|
35
63
|
getConnectedDeviceList(setting?: RemoteDBSettings): Promise<false | {
|
|
36
64
|
node_info: Record<string, NodeData>;
|
|
37
65
|
accepted_nodes: string[];
|