We support pixel syncing only at the moment. Telaria ad server returns 'ext'
as an optional parameter if the tag has 'incIdSync' parameter set to true
@param syncOptions
@param serverResponses
@returns {Array}
502867
function (syncOptions, serverResponses) {
    const syncs = [];
    if (syncOptions.pixelEnabled && serverResponses.length) {
      try {
        serverResponses[0].body.ext.telaria.userSync.forEach(url => syncs.push({type: 'image', url: url}));
      } catch (e) {}
    }
    return syncs;
  }
1228600
public ClientResponse callExecuteTask(long timeoutMS, byte[] params) throws IOException, InterruptedException {
        SimpleClientResponseAdapter.SyncCallback syncCb = new SimpleClientResponseAdapter.SyncCallback();
        callExecuteTaskAsync(syncCb, params);
        return syncCb.getResponse(timeoutMS);
    }
1019916
function loadAliases(opts) {
        opts.preload = opts.preload || [];
        var preloadDirs = _.isArray(opts.preload) ? opts.preload : [opts.preload];
        preloadDirs.push(this.servicesDir);
        var aliases = _.extend({}, this.loadMappings(this.rootDir, preloadDirs), opts.serverAliases);

        // we also want to point the shorter adapter names to the same objects
        _.each(this.adapterMap, function (impl, type) {
            var fullName = utils.getCamelCase(impl + '.' + type + '.adapter');
            var shortName = utils.getPascalCase(type + '.adapter');
            if (aliases[fullName]) {
                aliases[shortName] = aliases[fullName];
            }
        });

        return aliases;
    }
1135574
public boolean syncPlugins(NewRelicCache cache)
    {
        boolean ret = true;

        if(apiClient == null)
            throw new IllegalArgumentException("null API client");

        // Get the Plugins configuration using the REST API
        if(cache.isPluginsEnabled())
        {
            ret = false;

            logger.info("Getting the plugins");
            Collection<Plugin> plugins = apiClient.plugins().list(true);
            for(Plugin plugin : plugins)
            {
                cache.plugins().add(plugin);

                logger.fine("Getting the components for plugin: "+plugin.getId());
                Collection<PluginComponent> components = apiClient.pluginComponents().list(PluginComponentService.filters().pluginId(plugin.getId()).build());
                cache.plugins().components(plugin.getId()).add(components);
            }

            cache.setUpdatedAt();

            ret = true;
        }

        return ret;
    }
829984
public OperationFuture<List<Server>> createSnapshot(Integer expirationDays, Server... serverRefs) {
        return powerOperationResponse(
            Arrays.asList(serverRefs),
            "Create Snapshot",
            client.createSnapshot(
                new CreateSnapshotRequest()
                    .snapshotExpirationDays(expirationDays)
                    .serverIds(ids(serverRefs))
            )
        );
    }
1168423
@Nullable
  public ServerSocketsList getServerSockets(long serverId, long fromId, int maxPageSize) {
    ServerSocketMap serverSockets = perServerSockets.get(serverId);
    if (serverSockets == null) {
      return null;
    }
    List<InternalWithLogId> socketList = new ArrayList<>(maxPageSize);
    Iterator<InternalInstrumented<SocketStats>> iterator
        = serverSockets.tailMap(fromId).values().iterator();
    while (socketList.size() < maxPageSize && iterator.hasNext()) {
      socketList.add(iterator.next());
    }
    return new ServerSocketsList(socketList, !iterator.hasNext());
  }
1285648
private SyncObject getSyncObject(JsonNode jsonNode) {
		
		String name = null;
		JsonNode jn1 =null;
		SyncObject syncObject = new SyncObject();
		
		
		Iterator<String> ite = jsonNode.fieldNames();

		while (ite.hasNext()) {
			String key = ite.next();
            if (JsonResourceTypeLocator.lookupType(key) != null) {

                jn1 = jsonNode.get(key);
                LOG.debug("Query response entity Key :" + key);

                try {
                    //Force the data to be casted to its type
                    Object intuitType = mapper.treeToValue(jn1, JsonResourceTypeLocator.lookupType(key));
                    //Double check
                    if (intuitType instanceof IntuitEntity) {
                        JAXBElement<? extends IntuitEntity> intuitObject = objFactory
                                .createIntuitObject((IntuitEntity) intuitType);
                        syncObject.setIntuitObject(intuitObject);
                    }
                }  catch (JsonParseException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (JsonMappingException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
		}
		return syncObject;
	}
1105017
def _handle_dist_server(ds_type, repos_array):
    """"""
    if ds_type not in ("JDS", "CDP"):
        raise ValueError("Must be JDS or CDP")
    prompt = "Does your JSS use a %s? (Y|N): " % ds_type
    result = loop_until_valid_response(prompt)

    if result:
        repo_dict = ElementTree.SubElement(repos_array, "dict")
        repo_name_key = ElementTree.SubElement(repo_dict, "key")
        repo_name_key.text = "type"
        repo_name_string = ElementTree.SubElement(repo_dict, "string")
        repo_name_string.text = ds_type
895012
public ServiceFuture<List<ServerInner>> listAsync(final ServiceCallback<List<ServerInner>> serviceCallback) {
        return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback);
    }
586807
function BlockTxnPacket(response, witness) {
  if (!(this instanceof BlockTxnPacket))
    return new BlockTxnPacket(response, witness);

  Packet.call(this);

  this.response = response || new bip152.TXResponse();
  this.witness = witness || false;
}
1006859
public void sync(final String path, VoidCallback cb, Object ctx) {
        verbotenThreadCheck();
        final String clientPath = path;
        PathUtils.validatePath(clientPath);

        final String serverPath = prependChroot(clientPath);

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.sync);
        SyncRequest request = new SyncRequest();
        SyncResponse response = new SyncResponse();
        request.setPath(serverPath);
        cnxn.queuePacket(h, new ReplyHeader(), request, response, cb,
                clientPath, serverPath, ctx, null);
    }
970048
private void sendResponse(Collection<Operation> operations, ServiceNamespace ns) {
        NodeEngine nodeEngine = getNodeEngine();

        PartitionReplicaSyncResponse syncResponse = createResponse(operations, ns);
        Address target = getCallerAddress();
        ILogger logger = getLogger();
        if (logger.isFinestEnabled()) {
            logger.finest("Sending sync response to -> " + target + " for partitionId="
                    + getPartitionId() + ", replicaIndex=" + getReplicaIndex() + ", namespaces=" + ns);
        }

        // PartitionReplicaSyncResponse is TargetAware and sent directly without invocation system.
        syncResponse.setTarget(target);

        OperationService operationService = nodeEngine.getOperationService();
        operationService.send(syncResponse, target);
    }
258561
private void evaluateSync(String data){
        if (!m_sync && data!=null && data.contains(org.opencms.gwt.client.rpc.CmsRpcAction.SYNC_TOKEN)){
            m_sync=true;
        }
    }
176058
function(readPreference, servers) {
  if (readPreference.tags == null) return servers;
  var filteredServers = [];
  var tagsArray = Array.isArray(readPreference.tags) ? readPreference.tags : [readPreference.tags];

  // Iterate over the tags
  for (var j = 0; j < tagsArray.length; j++) {
    var tags = tagsArray[j];

    // Iterate over all the servers
    for (var i = 0; i < servers.length; i++) {
      var serverTag = servers[i].lastIsMaster().tags || {};

      // Did we find the a matching server
      var found = true;
      // Check if the server is valid
      for (var name in tags) {
        if (serverTag[name] !== tags[name]) {
          found = false;
        }
      }

      // Add to candidate list
      if (found) {
        filteredServers.push(servers[i]);
      }
    }
  }

  // Returned filtered servers
  return filteredServers;
}
303305
function cloneServerInitOptions(serverInitOptions) {
    var result = {
        serverUrl: serverInitOptions.serverUrl,
        application: serverInitOptions.application,
        clientApp: serverInitOptions.clientApp,
        tenantOrga: serverInitOptions.tenantOrga,
        logonCallback: serverInitOptions.logonCallback,
    };
    if (result.serverUrl && result.serverUrl[result.serverUrl.length - 1] !== '/') {
        result.serverUrl += '/';
    }
    if (serverInitOptions.clientCertificate) {
        result.clientCertificate = _.clone(serverInitOptions.clientCertificate);
    }
    if (serverInitOptions.agentOptions) {
        result.agentOptions = _.clone(serverInitOptions.agentOptions);
    }
    return result;
}
529075
function (serverResponse) {
    const bids = [];
    let bid = null;

    if (!serverResponse.hasOwnProperty('body') || !serverResponse.body.hasOwnProperty('seatbid')) {
      return bids;
    }

    const responseBody = serverResponse.body;
    const seatbid = responseBody.seatbid;
    for (let i = 0; i < seatbid.length; i++) {
      if (!seatbid[i].hasOwnProperty('bid')) {
        continue;
      }

      // Transform rawBid in bid response to the format that will be accepted by prebid.
      const innerBids = seatbid[i].bid;
      for (let j = 0; j < innerBids.length; j++) {
        bid = parseBid(innerBids[j], responseBody.cur);
        bids.push(bid);
      }
    }

    return bids;
  }
840504
public static Response call(String server, String service, DataBinder binder, String... params) {
        return call(server, service, false, binder, params);
    }