use of com.swiftmq.impl.routing.single.smqpr.v400.ThrottleRequest in project swiftmq-ce by iitsoftware.
the class ThrottleQueue method process.
protected void process(Object[] objects, int len) {
for (int i = 0; i < len; i++) {
Request r = (Request) objects[i];
if (r.getDumpId() == SMQRFactory.THROTTLE_REQ) {
sem.reset();
sem.waitHere(((ThrottleRequest) r).getDelay());
} else {
outboundQueue.enqueue(r);
}
if (closed)
return;
}
}
use of com.swiftmq.impl.routing.single.smqpr.v400.ThrottleRequest in project swiftmq-ce by iitsoftware.
the class ThrottleQueue method process.
protected void process(Object[] objects, int len) {
for (int i = 0; i < len; i++) {
Request r = (Request) objects[i];
if (r.getDumpId() == SMQRFactory.THROTTLE_REQ) {
sem.reset();
sem.waitHere(((ThrottleRequest) r).getDelay());
} else {
outboundQueue.enqueue(r);
}
if (closed)
return;
}
}
Aggregations