Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RotatingFileStream<EntryType>

Core interface for publishing file data across multiple files seamlessly. When a file reaches a certain size threshold, incoming data will automatically be routed to the next available file in the queue.

When all files in the queue are full, the stream will wrap around to the oldest file and overwrite it with new data.

The methodology of how and when the rotation mechanism happens will be fully customizable through the options given in the constructor.

Type parameters

Hierarchy

  • RotatingFileStream

Index

Constructors

constructor

Properties

Protected Readonly options

options: RotatingFileStreamOptions<EntryType>

Methods

Protected chooseOptimalTarget

  • chooseOptimalTarget(a: EntryType, b: EntryType): EntryType

Protected isEntryFull

  • isEntryFull(entry: EntryType): boolean

Protected loadTargetEntry

  • loadTargetEntry(): Promise<EntryType>

refreshAllEntries

  • refreshAllEntries(): Promise<EntryType[]>

write

  • write(data: ArrayBuffer): Promise<void>

Generated using TypeDoc