trinity.buffer.storage.file module#

File Storage

class trinity.buffer.storage.file.FileStorage(config: StorageConfig)[源代码]#

基类:object

A wrapper of a local jsonl file.

If wrap_in_ray in StorageConfig is True, this class will be run as a Ray Actor, and provide a remote interface to the local file.

This wrapper is only for writing, if you want to read from the file, use StorageType.QUEUE instead.

__init__(config: StorageConfig) None[源代码]#
classmethod get_wrapper(config: StorageConfig)[源代码]#
write(data: List) None[源代码]#
read() List[源代码]#
acquire() int[源代码]#
release() int[源代码]#