X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdatarouter.git;a=blobdiff_plain;f=datarouter-node%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fnode%2FRateLimitedOperation.java;h=027045536ecc9ca842aca0ab95b28d3645ffeeb7;hp=94b694d4c37818dae668dd5fb0f9f3c7ba98a127;hb=cf55456bbe6ce4da723f9dfa64b573f02908ab24;hpb=5a55b790e8afa3131fd5f894e5d1b1e036dc4cd1 diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/RateLimitedOperation.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/RateLimitedOperation.java index 94b694d4..02704553 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/RateLimitedOperation.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/RateLimitedOperation.java @@ -28,7 +28,7 @@ import java.util.Timer; import java.util.TimerTask; /** - * Execute an operation no more frequently than a specified interval + * Execute an operation no more frequently than a specified interval. */ public abstract class RateLimitedOperation implements Runnable { @@ -41,10 +41,10 @@ public abstract class RateLimitedOperation implements Runnable { private long mininterval; /** - * Create a rate limited operation + * Create a rate limited operation. * * @param mininterval The minimum number of milliseconds after the last execution starts before a new execution can - * begin + * begin * @param timer The timer used to perform deferred executions */ public RateLimitedOperation(long mininterval, Timer timer) { @@ -53,7 +53,7 @@ public abstract class RateLimitedOperation implements Runnable { } /** - * Request that the operation be performed by this thread or at a later time by the timer + * Request that the operation be performed by this thread or at a later time by the timer. */ public void request() { if (premark()) { @@ -61,7 +61,8 @@ public abstract class RateLimitedOperation implements Runnable { } do { run(); - } while (demark()); + } + while (demark()); } private synchronized boolean premark() {