use of com.tencent.angel.ps.server.data.request.RequestContext in project angel by Tencent.
the class MatrixTransportClient method addToGetQueueForServer.
private void addToGetQueueForServer(ParameterServerId serverId, Request request) {
request.setContext(new RequestContext());
request.getContext().setServerId(serverId);
LinkedBlockingQueue<Request> queue = getItemQueues.get(serverId);
if (queue == null) {
queue = new LinkedBlockingQueue<>();
getItemQueues.putIfAbsent(serverId, queue);
queue = getItemQueues.get(serverId);
}
queue.add(request);
}
use of com.tencent.angel.ps.server.data.request.RequestContext in project angel by Tencent.
the class MatrixTransportClient method addToPutQueueForServer.
private void addToPutQueueForServer(ParameterServerId serverId, Request request) {
request.setContext(new RequestContext());
request.getContext().setServerId(serverId);
LinkedBlockingQueue<Request> queue = putItemQueues.get(serverId);
if (queue == null) {
queue = new LinkedBlockingQueue<>();
putItemQueues.putIfAbsent(serverId, queue);
queue = putItemQueues.get(serverId);
}
queue.add(request);
}
Aggregations