public class StampedLockServiceExecutor extends Object implements ServiceExecutor
ServiceExecutor
implemented via a StampedLock
.Constructor and Description |
---|
StampedLockServiceExecutor() |
Modifier and Type | Method and Description |
---|---|
void |
close(Runnable closeTask)
Closes the service, executing the specified task, first waiting for any concurrent executions to complete.
|
void |
execute(Runnable executeTask)
Executes the specified task, but only if the service was not already closed.
|
public void execute(Runnable executeTask)
ServiceExecutor
execute
in interface ServiceExecutor
public void close(Runnable closeTask)
ServiceExecutor
ServiceExecutor.close(Runnable)
invocations.close
in interface ServiceExecutor
Copyright © 2018 JBoss by Red Hat. All rights reserved.