Connects to the member and sends a snapshot request.
344934
protected void sendInstallRequest(MemberState member, InstallRequest request) {
    // Start the install to the member.
    member.startInstall();

    context.getConnections().getConnection(member.getMember().serverAddress()).whenComplete((connection, error) -> {
      context.checkThread();

      if (open) {
        if (error == null) {
          sendInstallRequest(connection, member, request);
        } else {
          // Complete the install to the member.
          member.completeInstall();

          // Trigger reactions to the install request failure.
          handleInstallRequestFailure(member, request, error);
        }
      }
    });
  }
1151746
def send(self, request):
        ''''''
        return self.session.send(request(self.url, self.auth))
1090893
private void initiateSnapshotScan() {
        m_lastSysprocInvocation = System.currentTimeMillis();
        Object params[] = new Object[1];
        params[0] = m_path;
        setState(State.SCANNING);
        long handle = m_nextCallbackHandle++;
        m_procedureCallbacks.put(handle, new ProcedureCallback() {

            @Override
            public void clientCallback(final ClientResponse clientResponse)
                    throws Exception {
                processClientResponsePrivate(clientResponse);
            }

        });
        SNAP_LOG.info("Initiating snapshot scan of " + m_path);
        m_initiator.initiateSnapshotDaemonWork("@SnapshotScan", handle, params);
    }
795324
def connect(self):
        ""
        log.info("connecting")

        # don't have the connection attempt reconnects, because when it goes
        # down we are going to cycle to the next potential peer from the Client
        self._peer = connection.Peer(
                None, self._dispatcher, self._addrs.popleft(),
                backend.Socket(), reconnect=False)
        self._peer.start()
552935
void fireMemberAdded(AsteriskQueueMemberImpl member)
    {
        synchronized (listeners)
        {
            for (AsteriskQueueListener listener : listeners)
            {
                try
                {
                    listener.onMemberAdded(member);
                }
                catch (Exception e)
                {
                    logger.warn("Exception in onMemberAdded()", e);
                }
            }
        }
    }
1202024
public function getSnapshot(): Snapshot
    {
        $value = $this->apiClient->get($this->uri);

        return new Snapshot($this, $value);
    }
1064509
def connect(self, object, callback):
		""""""
		return subscription(self.map.setdefault(object, []), callback)
260036
def update_snapshot(self, snapshot, display_name=None,
            display_description=None):
        
        return snapshot.update(display_name=display_name,
                display_description=display_description)
703457
def snapshots_to_send(source_snaps, dest_snaps):
    """"""
    if len(source_snaps) == 0:
        raise AssertionError("No snapshots exist locally!")
    if len(dest_snaps) == 0:
        # nothing on the remote side, send everything
        return None, source_snaps[-1]
    last_remote = dest_snaps[-1]
    for snap in reversed(source_snaps):
        if snap == last_remote:
            # found a common snapshot
            return last_remote, source_snaps[-1]
    # sys.stderr.write("source:'{}', dest:'{}'".format(source_snaps, dest_snaps))
    raise AssertionError("Latest snapshot on destination doesn't exist on source!")
974405
protected void sendInstallRequest(RaftMemberContext member, InstallRequest request) {
    // Start the install to the member.
    member.startInstall();

    long timestamp = System.currentTimeMillis();

    log.trace("Sending {} to {}", request, member.getMember().memberId());
    raft.getProtocol().install(member.getMember().memberId(), request).whenCompleteAsync((response, error) -> {
      // Complete the install to the member.
      member.completeInstall();

      if (open) {
        if (error == null) {
          log.trace("Received {} from {}", response, member.getMember().memberId());
          handleInstallResponse(member, request, response, timestamp);
        } else {
          log.warn("Failed to install {}", member.getMember().memberId());

          // Trigger reactions to the install response failure.
          handleInstallResponseFailure(member, request, error);
        }
      }
    }, raft.getThreadContext());
  }
1289691
function RouterState(root, snapshot) {
        _super.call(this, root);
        this.snapshot = snapshot;
        setRouterStateSnapshot(this, root);
    }
314984
private Snapshot createSnapshot(SnapshotDescriptor descriptor) {
    if (storage.level() == StorageLevel.MEMORY) {
      return createMemorySnapshot(descriptor);
    } else {
      return createDiskSnapshot(descriptor);
    }
  }
14187
def restore_snapshot(self, subid, snapshotid, params=None):
        ''' 
        '''
        params = update_params(params, {
            'SUBID': subid,
            'SNAPSHOTID': snapshotid
        })
        return self.request('/v1/server/restore_snapshot', params, 'POST')
319552
@Override
	public void snapshotState(FunctionSnapshotContext context) throws Exception {
		sessionIdsPerSnapshot.add(new Tuple2<>(context.getCheckpointId(), sessionIds));
		sessionIds = new ArrayList<>(64);
		super.snapshotState(context);
	}
1098688
def _send_request(self, method, params=[], is_subscribe = False):
        '''
            
        '''
        # pick a new ID
        self.next_id += 1
        req_id = self.next_id

        # serialize as JSON
        msg = {'id': req_id, 'method': method, 'params': params}

        # subscriptions are a Q, normal requests are a future
        if is_subscribe:
            waitQ = asyncio.Queue()
            self.subscriptions[method].append(waitQ)

        fut = asyncio.Future(loop=self.loop)

        self.inflight[req_id] = (msg, fut)

        # send it via the transport, which serializes it
        if not self.protocol:
            logger.debug("Need to reconnect to server")

            async def connect_first():
                await self.reconnect()
                self.protocol.send_data(msg)

            self.loop.create_task(connect_first())
        else:
            # typical case, send request immediatedly, response is a future
            self.protocol.send_data(msg)

        return fut if not is_subscribe else (fut, waitQ)
418081
void fireMemberStateChanged(AsteriskQueueMemberImpl member)
    {
        synchronized (listeners)
        {
            for (AsteriskQueueListener listener : listeners)
            {
                try
                {
                    listener.onMemberStateChange(member);
                }
                catch (Exception e)
                {
                    logger.warn("Exception in onMemberStateChange()", e);
                }
            }
        }
    }
477108
public void snapshotStateForKeyGroup(DataOutputView stream, int keyGroupIdx) throws IOException {
		Preconditions.checkState(useLegacySynchronousSnapshots);
		InternalTimerServiceSerializationProxy<K> serializationProxy =
			new InternalTimerServiceSerializationProxy<>(this, keyGroupIdx);

		serializationProxy.write(stream);
	}