ó
    -j†i$  ã                  ó¼   • S SK Jr  S SKrS SKJr  S SKJr  S SKJr   " S S\R                  5      r
 " S S	\R                  5      r\" S
SSS9 " S S\
5      5       rg)é    )ÚannotationsN)ÚIterable)ÚAny)Údeprecated_classc                  óh   • \ rS rSrSr\R                  SS j5       r\R                  SS j5       rSr	g)	ÚBaseJournalBackendé
   áÑ  Base class for Journal storages.

Storage classes implementing this base class must guarantee process safety. This means,
multiple processes might concurrently call ``read_logs`` and ``append_logs``. If the
backend storage does not internally support mutual exclusion mechanisms, such as locks,
you might want to use :class:`~optuna.storages.journal.JournalFileSymlinkLock` or
:class:`~optuna.storages.journal.JournalFileOpenLock` for creating a critical section.

c                ó   • [         e)a,  Read logs with a log number greater than or equal to ``log_number_from``.

If ``log_number_from`` is 0, read all the logs.

Args:
    log_number_from:
        A non-negative integer value indicating which logs to read.

Returns:
    Logs with log number greater than or equal to ``log_number_from``.
©ÚNotImplementedError)ÚselfÚlog_number_froms     ÚW/home/james-whalen/.local/lib/python3.13/site-packages/optuna/storages/journal/_base.pyÚ	read_logsÚBaseJournalBackend.read_logs   s
   € ô "Ð!ó    c                ó   • [         e)zbAppend logs to the backend.

Args:
    logs:
        A list that contains json-serializable logs.
r   )r   Úlogss     r   Úappend_logsÚBaseJournalBackend.append_logs%   s
   € ô "Ð!r   © N)r   ÚintÚreturnzIterable[dict[str, Any]])r   zlist[dict[str, Any]]r   ÚNone)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚabcÚabstractmethodr   r   Ú__static_attributes__r   r   r   r   r   
   s;   † ñð 	×Ñó"ó ð"ð 	×Ñó"ó ó"r   r   c                  óh   • \ rS rSrSr\R                  SS j5       r\R                  SS j5       rSr	g)	ÚBaseJournalSnapshoté1   z¬Optional base class for Journal storages.

Storage classes implementing this base class may work faster when
constructing the internal state from the large amount of logs.
c                ó   • [         e)zQSave snapshot to the backend.

Args:
    snapshot: A serialized snapshot (bytes)
r   )r   Úsnapshots     r   Úsave_snapshotÚ!BaseJournalSnapshot.save_snapshot8   ó
   € ô "Ð!r   c                ó   • [         e)zmLoad snapshot from the backend.

Returns:
    A serialized snapshot (bytes) if found, otherwise :obj:`None`.
r   )r   s    r   Úload_snapshotÚ!BaseJournalSnapshot.load_snapshotA   r+   r   r   N)r(   Úbytesr   r   )r   zbytes | None)
r   r   r   r   r    r!   r"   r)   r-   r#   r   r   r   r%   r%   1   s;   † ñð 	×Ñó"ó ð"ð 	×Ñó"ó ó"r   r%   z4.0.0z6.0.0zAUse :class:`~optuna.storages.journal.BaseJournalBackend` instead.)Útextc                  ó   • \ rS rSrSrSrg)ÚBaseJournalLogStorageéK   r
   r   N)r   r   r   r   r    r#   r   r   r   r2   r2   K   s   † ôr   r2   )Ú
__future__r   r!   Úcollections.abcr   Útypingr   Úoptuna._deprecatedr   ÚABCr   r%   r2   r   r   r   Ú<module>r9      s^   ðÝ "ã 
Ý $Ý å /ô$"˜Ÿ™ô $"ôN"˜#Ÿ'™'ô "ñ4 ØˆWÐ^ñô	Ð.ó 	óñ	r   