def Bytes.flush
mylsm-lsm-store@0.6.0.1 · mylsm.bend:737
import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsm
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as RawByteDb
import mylsm-lsm-store@0.6.0.1/src/coordinator/Client.bend as OwnerClient
import mylsm-lsm-store@0.6.0.1/src/coordinator/ByteClient.bend as OwnerByteClient
737
738def Bytes.flush(handle: Bytes.Handle) -> IO(Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>):
739 match handle:
740 case ByteHandle{raw}:
741 do IO<Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>>:
742 pair : RawByteDb.Handle & Result<&1, &1, RawByteDb.Error, Unit> <- RawByteDb.flush(raw)
743 return Bytes.flush.result(pair)
744 case RemoteByteHandle{session}:
745 do IO<Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>>:
746 pair : OwnerClient.Session & Result<&1, &1, OwnerClient.Error, Unit> <-
747 OwnerByteClient.flush(session)
748 return Bytes.owner.unit.result(pair)