|
Brooklyn | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectbrooklyn.entity.rebind.persister.MementoFileWriter
public class MementoFileWriter
For asynchronously writing to a file. This class is thread-safe. If a write is in progress, one will be scheduled. If a write is already scheduled, we will just rely on the existing one; otherwise we will write now.
| Constructor Summary | |
MementoFileWriter(java.io.File file, ListeningExecutorService executor, MementoSerializer serializer)
@param file |
|
| Method Summary | |
|---|---|
void
|
delete()
|
void
|
waitForWriteCompleted(long timeout, java.util.concurrent.TimeUnit unit)
This method must only be used for testing. |
void
|
write(java.lang.Object val)
|
| Methods inherited from class java.lang.Object | |
|---|---|
| java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
| Constructor Detail |
|---|
public MementoFileWriter(java.io.File file, ListeningExecutorService executor, MementoSerializer serializer)
executor - A sequential executor (e.g. SingleThreadedExecutor, or equivalent)
| Method Detail |
|---|
public void delete()
@VisibleForTesting public void waitForWriteCompleted(long timeout, java.util.concurrent.TimeUnit unit)
public void write(java.lang.Object val)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.