UNPKG

@hpcc-js/comms

Version:
103 lines (102 loc) 4.58 kB
import { Cache, StateCallback, StateEvents, StateObject, StatePropCallback } from "@hpcc-js/util"; import { IConnection, IOptions } from "../connection.ts"; import { WsSMC } from "../services/wsSMC.ts"; import { FileSpray, FileSprayService, UpdateDFUWorkunitEx } from "../services/fileSpray.ts"; import * as WsTopology from "../services/wsTopology.ts"; export declare class DFUWorkunitCache extends Cache<{ BaseUrl: string; ID: string; }, DFUWorkunit> { constructor(); } export type DFUWorkunitEvents = "finished" | StateEvents; export type UDFUWorkunitState = FileSpray.DFUWorkunit; export type IDFUWorkunitState = FileSpray.DFUWorkunit | WsSMC.ActiveWorkunit; export declare class DFUWorkunit extends StateObject<UDFUWorkunitState, IDFUWorkunitState> implements FileSpray.DFUWorkunit { connection: FileSprayService; topologyConnection: WsTopology.TopologyService; get BaseUrl(): string; get properties(): FileSpray.DFUWorkunit; get ID(): string; get DFUServerName(): string; get ClusterName(): string; get JobName(): string; get Queue(): string; get User(): string; get isProtected(): boolean; get Command(): number; get CommandMessage(): string; get PercentDone(): number; get SecsLeft(): number; get ProgressMessage(): string; get SummaryMessage(): string; get State(): number; get SourceLogicalName(): string; get SourceIP(): string; get SourceFilePath(): string; get SourceDali(): string; get SourceRecordSize(): number; get SourceFormat(): number; get RowTag(): string; get SourceNumParts(): number; get SourceDirectory(): string; get DestLogicalName(): string; get DestGroupName(): string; get DestDirectory(): string; get DestIP(): string; get DestFilePath(): string; get DestFormat(): number; get DestNumParts(): number; get DestRecordSize(): number; get Replicate(): boolean; get Overwrite(): boolean; get Compress(): boolean; get SourceCsvSeparate(): string; get SourceCsvQuote(): string; get SourceCsvTerminate(): string; get SourceCsvEscape(): string; get TimeStarted(): string; get TimeStopped(): string; get StateMessage(): string; get MonitorEventName(): string; get MonitorSub(): boolean; get MonitorShotLimit(): number; get SourceDiffKeyName(): string; get DestDiffKeyName(): string; get Archived(): boolean; get encrypt(): string; get decrypt(): string; get failIfNoSourceFile(): boolean; get recordStructurePresent(): boolean; get quotedTerminator(): boolean; get preserveCompression(): boolean; get expireDays(): number; get PreserveFileParts(): boolean; get FileAccessCost(): number; get KbPerSecAve(): number; get KbPerSec(): number; static create(optsConnection: IOptions | IConnection, dfuServerQueue: string): Promise<DFUWorkunit>; static attach(optsConnection: IOptions | IConnection, wuid: string, state?: IDFUWorkunitState): DFUWorkunit; static sprayFixed(server: IOptions | IConnection, request: Partial<FileSpray.SprayFixed>): Promise<DFUWorkunit>; static sprayVariable(server: IOptions | IConnection, request: Partial<FileSpray.SprayVariable>): Promise<DFUWorkunit>; static despray(server: IOptions | IConnection, request: Partial<FileSpray.Despray>): Promise<DFUWorkunit>; update(request: Partial<UpdateDFUWorkunitEx>): Promise<FileSpray.UpdateDFUWorkunitResponse>; isComplete(): boolean; isFailed(): boolean; isDeleted(): boolean; isRunning(): boolean; abort(): Promise<FileSpray.AbortDFUWorkunitResponse>; delete(): Promise<FileSpray.DFUWorkunitsActionResponse>; refresh(full?: boolean): Promise<this>; fetchXML(callback?: void): Promise<string>; protected _monitor(): void; protected _monitorTimeoutDuration(): number; protected DFUWUFile(_request?: Partial<FileSpray.DFUWUFileRequest>): Promise<string>; protected DFUWUAction(actionType: FileSpray.DFUWUActions): Promise<FileSpray.DFUWorkunitsActionResponse>; on(eventID: DFUWorkunitEvents, propIDorCallback: StateCallback | keyof UDFUWorkunitState, callback?: StatePropCallback): this; watchUntilComplete(callback?: StateCallback): Promise<this>; watchUntilRunning(callback?: StateCallback): Promise<this>; protected constructor(optsConnection: IOptions | IConnection, wuid?: string); clearState(wuid?: string): void; protected GetDFUWorkunit(_request?: Partial<FileSpray.GetDFUWorkunit>): Promise<FileSpray.GetDFUWorkunitResponse>; }