Tidying up some superflous lines of code in Scheduler
This commit is contained in:
parent
bd39ab0816
commit
379515771b
1 changed files with 4 additions and 12 deletions
|
|
@ -67,9 +67,7 @@ class DefaultScheduler extends Scheduler {
|
||||||
try {
|
try {
|
||||||
service.scheduleAtFixedRate(createSendRunnable(receiver, message, true), initialDelay, delay, timeUnit).asInstanceOf[ScheduledFuture[AnyRef]]
|
service.scheduleAtFixedRate(createSendRunnable(receiver, message, true), initialDelay, delay, timeUnit).asInstanceOf[ScheduledFuture[AnyRef]]
|
||||||
} catch {
|
} catch {
|
||||||
case e: Exception ⇒
|
case e: Exception ⇒ throw SchedulerException(message + " could not be scheduled on " + receiver, e)
|
||||||
val error = SchedulerException(message + " could not be scheduled on " + receiver, e)
|
|
||||||
throw error
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -92,9 +90,7 @@ class DefaultScheduler extends Scheduler {
|
||||||
try {
|
try {
|
||||||
service.scheduleAtFixedRate(runnable, initialDelay, delay, timeUnit).asInstanceOf[ScheduledFuture[AnyRef]]
|
service.scheduleAtFixedRate(runnable, initialDelay, delay, timeUnit).asInstanceOf[ScheduledFuture[AnyRef]]
|
||||||
} catch {
|
} catch {
|
||||||
case e: Exception ⇒
|
case e: Exception ⇒ throw SchedulerException("Failed to schedule a Runnable", e)
|
||||||
val error = SchedulerException("Failed to schedule a Runnable", e)
|
|
||||||
throw error
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,9 +103,7 @@ class DefaultScheduler extends Scheduler {
|
||||||
try {
|
try {
|
||||||
service.schedule(createSendRunnable(receiver, message, false), delay, timeUnit).asInstanceOf[ScheduledFuture[AnyRef]]
|
service.schedule(createSendRunnable(receiver, message, false), delay, timeUnit).asInstanceOf[ScheduledFuture[AnyRef]]
|
||||||
} catch {
|
} catch {
|
||||||
case e: Exception ⇒
|
case e: Exception ⇒ throw SchedulerException(message + " could not be scheduleOnce'd on " + receiver, e)
|
||||||
val error = SchedulerException(message + " could not be scheduleOnce'd on " + receiver, e)
|
|
||||||
throw error
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,9 +126,7 @@ class DefaultScheduler extends Scheduler {
|
||||||
try {
|
try {
|
||||||
service.schedule(runnable, delay, timeUnit).asInstanceOf[ScheduledFuture[AnyRef]]
|
service.schedule(runnable, delay, timeUnit).asInstanceOf[ScheduledFuture[AnyRef]]
|
||||||
} catch {
|
} catch {
|
||||||
case e: Exception ⇒
|
case e: Exception ⇒ throw SchedulerException("Failed to scheduleOnce a Runnable", e)
|
||||||
val error = SchedulerException("Failed to scheduleOnce a Runnable", e)
|
|
||||||
throw error
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue