Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
mderka committed Mar 4, 2016
1 parent c50ee2e commit 06dce67
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -106,8 +108,11 @@ public class LocalDnsHelper {
private static final TreeSet<String> FORBIDDEN = Sets.newTreeSet(
ImmutableList.of("google.com.", "com.", "example.com.", "net.", "org."));
private static final Pattern ZONE_NAME_RE = Pattern.compile("[a-z][a-z0-9-]*");
private static final ScheduledExecutorService EXECUTORS =
Executors.newScheduledThreadPool(4, Executors.defaultThreadFactory());

static {

try {
BASE_CONTEXT = new URI(CONTEXT);
} catch (URISyntaxException e) {
Expand Down Expand Up @@ -746,6 +751,12 @@ Response createChange(String projectId, String zoneName, Change change, String..
private Thread invokeChange(final String projectId, final String zoneName,
final String changeId) {
if (delayChange > 0) {
EXECUTORS.scheduleWithFixedDelay(new Runnable() {
@Override
public void run() {
applyExistingChange(projectId, zoneName, changeId);
}
}, delayChange, )
Thread thread = new Thread() {
@Override
public void run() {
Expand Down

0 comments on commit 06dce67

Please sign in to comment.