SwiftclassXPCDistributed

class XPCDistributed.XPCSystem.Session

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

Members 44

  1. deinitdeinit
  2. fieldlet activationFuse: XPCDistributed.Fuse
  3. fieldlet actorSystem: XPCDistributed.XPCSystem+0x10
  4. fieldlet cancellationEvent: XPCDistributed.UnownedAwaitableEvent<()>
  5. fieldlet id: XPCDistributed.ID64+0x18
  6. fieldlet idGenerator: XPCDistributed.ID64.Generator
  7. fieldlet isBidirectional: Bool
  8. fieldlet kind: XPCDistributed.XPCSystem.Session.Kind
  9. fieldvar ownedLocalInterfaceActivationEvent: XPCDistributed.OwnedAwaitableEvent<XPCDistributed.XPCSystem.Session.LocalInterface.ActivationToken>?
  10. fieldvar pendingInvocationExecutionTasks: [XPCDistributed.ID64 : Task<(), Never>]
  11. fieldlet sharedActors: Synchronization.Mutex<[XPCDistributed.XPCSystem.SharedActorKey : Distributed.DistributedActor]>
  12. fieldlet unownedLocalInterfaceActivationEvent: XPCDistributed.UnownedAwaitableEvent<()>
  13. funcactivateTransport() throws(XPCDistributed.XPCSystem.SetupError) -> ()
  14. funcaddPendingInvocationExecutionTask(_: Task<(), Never>, withID: XPCDistributed.ID64) -> ()
  15. funccancel(because: String) -> ()
  16. funccancelAllPendingInvocationExecutionTasks() -> ()
  17. funccancelPendingInvocationExecutionTask(withID: XPCDistributed.ID64) -> ()
  18. funccancellationCompleted() -> ()
  19. funcescalatePendingInvocationExecution(withID: XPCDistributed.ID64, to: TaskPriority) -> ()
  20. funchandleActorShared(XPCDistributed.XPCSystem.RawActorID.Local) -> XPCDistributed.XPCSystem.SharedActorKey
  21. funchandleReceivedNotification(XPCDistributed.XPCSystem.Transport.Packet.Payload) -> ()
  22. funchandleReceivedRequest(_: XPCDistributed.XPCSystem.Transport.Packet.Payload, replyUsing: (XPCDistributed.XPCSystem.Transport.Packet.Payload) -> ()) -> ()
  23. funchandleTransportCancellation() -> ()
  24. funcreadyToReceive(Task<XPCDistributed.XPCSystem.Session.LocalInterface.ActivationToken, Never>) throws(XPCDistributed.XPCSystem.SetupError) -> ()
  25. funcremoteSatisfiesActorSystemRequirement() -> Bool
  26. funcreplyToPendingInvocation(withID: XPCDistributed.ID64, replyBlock: () -> ()) async -> ()
  27. funcresolveSharedActor(at: XPCDistributed.XPCSystem.SharedActorKey) -> Distributed.DistributedActor?
  28. funcsendInvocation<A where A: Decodable, A: Encodable>(to: XPCDistributed.XPCSystem.ActorID, target: Distributed.RemoteCallTarget, invocation: inout XPCDistributed.XPCSystem.InvocationEncoder) async throws(XPCDistributed.XPCSystem.RemoteInvocationCancellationError) -> A
  29. funcsendNotification(XPCDistributed.XPCSystem.Session.RemoteNotification) -> ()
  30. funcshareActor(XPCDistributed.XPCSystem.RawActorID.Local) -> XPCDistributed.XPCSystem.SharedActorKey
  31. funcupdatePeerSession(XPCDistributed.XPCSystem.Session) -> ()
  32. funcverifyEscalatedInvocationResponse(withID: XPCDistributed.ID64, to: TaskPriority) -> ()
  33. funcwaitForCancellation() async -> ()
  34. funcwaitForLocalInterfaceActivation() async -> ()
  35. initXPCDistributed.XPCSystem.Session.__allocating_init(actorSystem: XPCDistributed.XPCSystem, local: XPCDistributed.XPCSystem.Session.LocalSessionState, options: XPCDistributed.XPCSystem.Session.InitializationOptions) -> XPCDistributed.XPCSystem.Session
  36. initXPCDistributed.XPCSystem.Session.__allocating_init(actorSystem: XPCDistributed.XPCSystem, transport: XPCDistributed.XPCSystem.Transport, options: XPCDistributed.XPCSystem.Session.InitializationOptions) throws(XPCDistributed.XPCSystem.SetupError) -> XPCDistributed.XPCSystem.Session
  37. typealiastypealias ID = XPCDistributed.ID64
  38. varfinal var debugDescription: String { get }
  39. varfinal var isCancelled: Bool { get }
  40. varfinal var local: XPCDistributed.XPCSystem.Session.LocalInterface { get }
  41. varfinal var optimizeSelfIPC: Bool { get }
  42. varfinal var remote: XPCDistributed.XPCSystem.Session.RemoteInterface { get }
  43. varfinal var remoteAuditToken: audit_token_t? { get }
  44. varfinal var transport: XPCDistributed.XPCSystem.Transport { get }
class XPCDistributed.XPCSystem.Session {
    class LocalSessionState {
        let label: Swift.String
        final weak var peerSession: XPCDistributed.XPCSystem.Session?
        let cancellationFuse: XPCDistributed.Fuse

        init(label: Swift.String, peerSession: XPCDistributed.XPCSystem.Session?)

        final var isCancelled: Swift.Bool {
            get
        }

        final func cancel(because: Swift.String) -> Swift.Bool

        static func clientSession<A>(to: A) -> Self where A: XPCDistributed.XPCSystem.ServiceRegistry.Key
        static func serverSession(for: XPCDistributed.XPCSystem.Session) -> Self
        static func currentProcessAuditToken() -> __C.audit_token_t?

        deinit
    }
    enum Kind {
        case xpc(XPCDistributed.XPCSystem.Transport)
        case local(XPCDistributed.XPCSystem.Session.LocalSessionState)
    }
    struct InitializationOptions {
        let rawValue: Swift.UInt64

        static let bidirectional: XPCDistributed.XPCSystem.Session.InitializationOptions
        static let inactive: XPCDistributed.XPCSystem.Session.InitializationOptions
    }
    struct ServiceConnectArguments {
        let peerRequirement: XPC.XPCPeerRequirement?
        let options: XPCDistributed.XPCSystem.Session.InitializationOptions

        init(peerRequirement: XPC.XPCPeerRequirement?, options: XPCDistributed.XPCSystem.Session.InitializationOptions)
    }
    struct RemoteInterface {
        let session: XPCDistributed.XPCSystem.Session

        init(session: XPCDistributed.XPCSystem.Session)

        var auditToken: __C.audit_token_t? {
            get
        }

        func setBackpressurePolicy(_: XPCDistributed.XPCSystem.BackpressurePolicy)
        func import<A>(clientActorFor: Swift.String) -> A where A: Distributed.DistributedActor, A.ActorSystem == XPCDistributed.XPCSystem
        func import<A>(defaultActorFor: A.Type) -> A where A: Distributed._DistributedActorStub, A.ActorSystem == XPCDistributed.XPCSystem
        func satisfies(requirement: XPC.XPCPeerRequirement) -> Swift.Bool?
    }
    struct RemoteInvocationRequest {
        enum CodingKeys {
            case id
            case basePriority
            case targetedSharedActor
            case remoteCallIdentifier
            case contents
        }
        enum InvocationContents {
            case send(XPCDistributed.XPCSystem.InvocationEncoder)
            case recv(XPCDistributed.XPCSystem.InvocationDecoder)
        }
        let id: XPCDistributed.ID64
        let basePriority: Swift.TaskPriority?
        let targetedSharedActor: XPCDistributed.XPCSystem.SharedActorKey
        let remoteCallIdentifier: Swift.String
        let contents: XPCDistributed.XPCSystem.Session.RemoteInvocationRequest.InvocationContents

        init(id: XPCDistributed.ID64, targetedSharedActor: XPCDistributed.XPCSystem.SharedActorKey, remoteCallTarget: Distributed.RemoteCallTarget, invocation: XPCDistributed.XPCSystem.InvocationEncoder)

        var invocation: XPCDistributed.XPCSystem.InvocationDecoder? {
            get
        }
        var targetRemoteCall: Distributed.RemoteCallTarget {
            get
        }
    }
    struct RemoteInvocationResponse<A> where A: Swift.Decodable, A: Swift.Encodable {
        enum RemoteInvocationFailure {
            enum CodingKeys {
                case resultPropagationFailed
                case executionFailed
            }
            enum ResultPropagationFailedCodingKeys {
                case _0
            }
            enum ExecutionFailedCodingKeys {
                case _0
            }
            case resultPropagationFailed(Swift.String)
            case executionFailed(Swift.String)
        }
        let _value: XPCDistributed.Either<A, XPCDistributed.XPCSystem.Session.RemoteInvocationResponse<A>.RemoteInvocationFailure>

        init(executionFailure: Swift.String)
        init(resultPropagationFailure: Swift.String)
        init(result: A)

        var value: A {
            get
        }
    }
    enum RemoteNotification {
        enum CodingKeys {
            case invocationCancelled
            case invocationEscalated
            case responseEscalated
        }
        enum InvocationCancelledCodingKeys {
            case id
        }
        enum InvocationEscalatedCodingKeys {
            case id
            case priority
        }
        enum ResponseEscalatedCodingKeys {
            case id
            case priority
        }
        case invocationCancelled(id: XPCDistributed.ID64)
        case invocationEscalated(id: XPCDistributed.ID64, priority: Swift.TaskPriority)
        case responseEscalated(id: XPCDistributed.ID64, priority: Swift.TaskPriority)
    }
    struct RemoteInvocationReplyEncoder {
        let userInfo: [Swift.CodingUserInfoKey : Any]
    }
    struct LocalInterface: ~Swift.Copyable {
        struct ActivationToken {
            enum CodingKeys {
                case id
            }
            let id: XPCDistributed.ID64

            init(id: XPCDistributed.ID64)
        }
        struct UncheckedHandoff {
            class Box {
                let mutex: Synchronization.Mutex<XPCDistributed.XPCSystem.Session?>
            }
            let box: XPCDistributed.XPCSystem.Session.LocalInterface.UncheckedHandoff.Box

            init(_: XPCDistributed.XPCSystem.Session)

            func complete() -> XPCDistributed.XPCSystem.Session.LocalInterface
        }
        let session: XPCDistributed.XPCSystem.Session

        init(session: borrowing XPCDistributed.XPCSystem.Session)

        func activateThenWithRemoteInterface<A, B>(perform: (_: XPCDistributed.XPCSystem.Session.RemoteInterface) async throws(B) -> A) async -> (result: Swift.Result<A, B>, token: XPCDistributed.XPCSystem.Session.LocalInterface.ActivationToken) where A: Swift.Sendable, B: Swift.Error
        func activateThenWithRemoteInterface<A>(perform: (_: XPCDistributed.XPCSystem.Session.RemoteInterface) async -> A) async -> (result: A, token: XPCDistributed.XPCSystem.Session.LocalInterface.ActivationToken) where A: Swift.Sendable
        func cancelWithoutActivating(because: Swift.String) -> (result: (), token: XPCDistributed.XPCSystem.Session.LocalInterface.ActivationToken)
        func activateThenWaitForCancellation() async -> (result: (), token: XPCDistributed.XPCSystem.Session.LocalInterface.ActivationToken)
        func export<A>(_: A, asServerActorFor: Swift.String) where A: Distributed.DistributedActor, A.ActorSystem == XPCDistributed.XPCSystem
        func export<A, B>(_: A, asDefaultActorFor: B.Type) where A: Distributed.DistributedActor, B: Distributed._DistributedActorStub, A.ActorSystem == XPCDistributed.XPCSystem, B.ActorSystem == XPCDistributed.XPCSystem
    }
    let actorSystem: XPCDistributed.XPCSystem
    let id: XPCDistributed.ID64
    let idGenerator: XPCDistributed.ID64.Generator
    let kind: XPCDistributed.XPCSystem.Session.Kind
    let sharedActors: Synchronization.Mutex<[XPCDistributed.XPCSystem.SharedActorKey : any Distributed.DistributedActor]>
    let cancellationEvent: XPCDistributed.UnownedAwaitableEvent<()>
    let unownedLocalInterfaceActivationEvent: XPCDistributed.UnownedAwaitableEvent<()>
    let isBidirectional: Swift.Bool
    var ownedLocalInterfaceActivationEvent: XPCDistributed.OwnedAwaitableEvent<XPCDistributed.XPCSystem.Session.LocalInterface.ActivationToken>?
    let activationFuse: XPCDistributed.Fuse
    var pendingInvocationExecutionTasks: [XPCDistributed.ID64 : Swift.Task<(), Swift.Never>]

    init(actorSystem: XPCDistributed.XPCSystem, transport: XPCDistributed.XPCSystem.Transport, options: XPCDistributed.XPCSystem.Session.InitializationOptions) throws(XPCDistributed.XPCSystem.SetupError)
    init(actorSystem: XPCDistributed.XPCSystem, local: XPCDistributed.XPCSystem.Session.LocalSessionState, options: XPCDistributed.XPCSystem.Session.InitializationOptions)

    final var debugDescription: Swift.String {
        get
    }
    final var isCancelled: Swift.Bool {
        get
    }
    final var local: XPCDistributed.XPCSystem.Session.LocalInterface {
        get
    }
    final var optimizeSelfIPC: Swift.Bool {
        get
    }
    final var remote: XPCDistributed.XPCSystem.Session.RemoteInterface {
        get
    }
    final var remoteAuditToken: __C.audit_token_t? {
        get
    }
    final var transport: XPCDistributed.XPCSystem.Transport {
        get
    }

    final func updatePeerSession(_: XPCDistributed.XPCSystem.Session)
    final func shareActor(_: XPCDistributed.XPCSystem.RawActorID.Local) -> XPCDistributed.XPCSystem.SharedActorKey
    final func readyToReceive(_: Swift.Task<XPCDistributed.XPCSystem.Session.LocalInterface.ActivationToken, Swift.Never>) throws(XPCDistributed.XPCSystem.SetupError)
    final func sendInvocation<A>(to: XPCDistributed.XPCSystem.ActorID, target: Distributed.RemoteCallTarget, invocation: inout XPCDistributed.XPCSystem.InvocationEncoder) async throws(XPCDistributed.XPCSystem.RemoteInvocationCancellationError) -> A where A: Swift.Decodable, A: Swift.Encodable
    final func sendNotification(_: XPCDistributed.XPCSystem.Session.RemoteNotification)
    final func activateTransport() throws(XPCDistributed.XPCSystem.SetupError)
    final func handleActorShared(_: XPCDistributed.XPCSystem.RawActorID.Local) -> XPCDistributed.XPCSystem.SharedActorKey
    final func resolveSharedActor(at: XPCDistributed.XPCSystem.SharedActorKey) -> (any Distributed.DistributedActor)?
    final func waitForCancellation() async
    final func cancellationCompleted()
    final func handleReceivedRequest(_: XPCDistributed.XPCSystem.Transport.Packet.Payload, replyUsing: @escaping (_: XPCDistributed.XPCSystem.Transport.Packet.Payload) -> ())
    final func replyToPendingInvocation(withID: XPCDistributed.ID64, replyBlock: () -> ()) async
    final func handleReceivedNotification(_: XPCDistributed.XPCSystem.Transport.Packet.Payload)
    final func handleTransportCancellation()
    final func waitForLocalInterfaceActivation() async
    final func addPendingInvocationExecutionTask(_: Swift.Task<(), Swift.Never>, withID: XPCDistributed.ID64)
    final func verifyEscalatedInvocationResponse(withID: XPCDistributed.ID64, to: Swift.TaskPriority)
    final func escalatePendingInvocationExecution(withID: XPCDistributed.ID64, to: Swift.TaskPriority)
    final func cancelPendingInvocationExecutionTask(withID: XPCDistributed.ID64)
    final func remoteSatisfiesActorSystemRequirement() -> Swift.Bool
    final func cancelAllPendingInvocationExecutionTasks()
    final func cancel(because: Swift.String)

    deinit
}