use of com.tvd12.quick.rpc.server.annotation.Rpc in project calabash by youngmonkeys.
the class MapRequestController method mapRemoveMany.
@Rpc(Commands.MAP_REMOVE_MANY)
public boolean mapRemoveMany(MapRemoveManyRequest request) {
BytesMap map = getBytesMap(request.getMapId());
map.remove(request.getKeys());
return Boolean.TRUE;
}
use of com.tvd12.quick.rpc.server.annotation.Rpc in project calabash by youngmonkeys.
the class MapRequestController method mapSet.
@Rpc(Commands.MAP_SET)
public boolean mapSet(MapSetRequest request) {
BytesMap map = getBytesMap(request.getMapId());
map.set(request.getKey(), request.getValue());
return Boolean.TRUE;
}
use of com.tvd12.quick.rpc.server.annotation.Rpc in project calabash by youngmonkeys.
the class MapRequestController method mapGetMany.
@Rpc(Commands.MAP_GET_MANY)
public List<byte[]> mapGetMany(MapGetManyRequest request) {
BytesMap map = getBytesMap(request.getMapId());
List<ByteArray> keys = ByteArray.wrap(request.getKeys());
Map<ByteArray, byte[]> m = map.get(keys);
List<byte[]> answer = new ArrayList<>(keys.size());
for (ByteArray key : keys) {
answer.add(m.get(key));
}
return answer;
}
use of com.tvd12.quick.rpc.server.annotation.Rpc in project calabash by youngmonkeys.
the class MessageChannelRequestController method messageChannelPublish.
@Rpc(Commands.MESSAGE_CHANNEL_PUBLISH)
public void messageChannelPublish(MessageChannelPublishRequest request) {
MessageChannel messageChannel = getMessageChannel(request.getChannelId());
messageChannel.broadcast(request);
}
use of com.tvd12.quick.rpc.server.annotation.Rpc in project calabash by youngmonkeys.
the class MapRequestController method mapPutAll.
@Rpc(Commands.MAP_PUT_ALL)
public boolean mapPutAll(MapPutAllRequest request) {
BytesMap map = getBytesMap(request.getMapId());
map.setAll(request.getValueMap());
return Boolean.TRUE;
}
Aggregations