docs: public PrimaryBackupSessionClient.Builder sessionBuilder(String primitiveName, PrimitiveType primitiveType, ServiceConfig serviceConfig) {
      byte[] configBytes = Serializer.using(primitiveType.namespace()).encode(serviceConfig);
      return new PrimaryBackupSessionClient.Builder() {
        @Override
        public SessionClient build() {
          Supplier<CompletableFuture<SessionClient>> proxyBuilder = () -> sessionIdService.nextSessionId()
              .thenApply(sessionId -> new PrimaryBackupSessionClient(
                  clientName,
                  partitionId,
                  sessionId,
                  primitiveType,
                  new PrimitiveDescriptor(
                      primitiveName,
                      primitiveType.name(),
                      configBytes,
                      numBackups,
                      replication),
                  clusterMembershipService,
                  PrimaryBackupClient.this.protocol,
                  primaryElection,
                  threadContextFactory.createContext()));
  
          SessionClient proxy;
          ThreadContext context = threadContextFactory.createContext();
          if (recovery == Recovery.RECOVER) {
            proxy = new RecoveringSessionClient(
                clientName,
                partitionId,
                primitiveName,
                primitiveType,
                proxyBuilder,
                context);
          } else {
            proxy = Futures.get(proxyBuilder.get());
          }
  
          // If max retries is set, wrap the client in a retrying proxy client.
          if (maxRetries > 0) {
            proxy = new RetryingSessionClient(
                proxy,
                context,
                maxRetries,
                retryDelay);
          }
          return new BlockingAwareSessionClient(proxy, context);
        }
      };
    }