INTERFACEAnUpdater ; IMPORT CVProto, FileUpdater, Logger, Reaper, StreamRd, SupFileRecSeq, SyncFixupQueue, Thread; TYPE T <: Public; Public = Thread.Closure OBJECT METHODS init(proto: CVProto.T; rd: StreamRd.T; collections: SupFileRecSeq.T; fixups: SyncFixupQueue.T; deleteLimit := -1; reaper: Reaper.T := NIL; destDir: TEXT := NIL; stats: Stats := NIL; trace: Logger.T := NIL): T; END; Stats <: StatsPublic; StatsPublic = MUTEX OBJECT updateInfo: ARRAY FileUpdater.UpdateType OF UpdateInfo; totals: UpdateInfo; METHODS init(): Stats; start(); update(type: FileUpdater.UpdateType); finish(); END; UpdateInfo = RECORD fileCount: CARDINAL := 0; (* Number of files updated *) fileBytes := 0.0d0; (* Final size of updated file *) wireBytes := 0.0d0; (* Bytes from wire before decompression *) commBytes := 0.0d0; (* Bytes in after decompression *) END;
Updater.T
is the thread that receives edit requests from the
server's File Differ, and applies the edits to the client's files.
proto
describes the version of the protocol being used.
rd
is the input stream from the File Differ.
If any RCS file updates fail to produce the proper checksums, Fixup
records will be communicated back to the Detailer via the fixups
queue.
If a deleteLimit
is specified, the updater will exit with a fatal
error if an attempt is made to delete more than that number of files.
The default is no limit.
If a reaper
is given, it will be notified just before the thread
terminates.
destDir
is an optional directory where updated files will be
placed. The default is to update files in their original locations.
If stats
is specified, the updater will maintain various
statistics in the given object. It will call the start
method
initially, then the update
method after each update of the
statistics, and finally, the finish
method just before terminating.
Debugging information is written to the trace
stream, if specified.
END Updater.