{
responses.offer(response);
}
});
final SnapshotDaemon sd = VoltDB.instance().getClientInterface().getSnapshotDaemon();
Runnable work = new Runnable() {
@Override
public void run() {
ClientResponse response = null;
// abort if unable to succeed in 2 hours
final long startTime = System.currentTimeMillis();
boolean hasRequested = false;
while (System.currentTimeMillis() - startTime <= TimeUnit.HOURS.toMillis(2)) {
try {
if (!hasRequested) {
sd.createAndWatchRequestNode(clientHandle, adapter, snapInfo, notifyChanges);
hasRequested = true;
}
try {
response = responses.poll(