Skip to content

Commit

Permalink
Use fm.last.commons:lastcommons-lang:3.0.0 for Clock dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
teabot committed Aug 22, 2012
1 parent 61cadcb commit d6fbbe9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 30 deletions.
1 change: 1 addition & 0 deletions changelog.txt
@@ -1,4 +1,5 @@
TBA
- Use fm.last.commons:lastcommons-lang:3.0.0 for Clock dependency
- moved to Apache Commons pool commons-pool:commons-pool:1.6 (thanks @jeeZzzup)
- Fix bug in MultiHostTrackerPool.getTracker() when host is unreachable it always tries the same host (thanks @igieon)
- setTrackerSoTimeout -> setTrackerReadTimeout in SpringMojiBean
Expand Down
7 changes: 6 additions & 1 deletion pom.xml
Expand Up @@ -240,7 +240,12 @@
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>

<dependency>
<groupId>fm.last.commons</groupId>
<artifactId>lastcommons-lang</artifactId>
<version>3.0.0</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/fm/last/moji/time/Clock.java

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/java/fm/last/moji/time/SystemClock.java

This file was deleted.

Expand Up @@ -27,8 +27,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import fm.last.moji.time.Clock;
import fm.last.moji.time.SystemClock;
import fm.last.commons.lang.time.Clock;

/**
* Manages the status of a given tracker host. Knows when it last failed, when the last successful request occurred.
Expand Down Expand Up @@ -59,7 +58,7 @@ public class ManagedTrackerHost {
}

ManagedTrackerHost(InetSocketAddress address) {
this(address, new Timer(), SystemClock.INSTANCE);
this(address, new Timer(), Clock.INSTANCE);
}

/**
Expand Down Expand Up @@ -112,7 +111,7 @@ void markAsFailed() {
resetTask.cancel();
}
log.debug("Scheduling reset of {} in {} {}", new Object[] { address, hostRetryInterval,
hostRetryIntervalTimeUnit.name().toLowerCase() });
hostRetryIntervalTimeUnit.name().toLowerCase() });
resetTask = resetTaskFactory.newInstance();
resetTimer.schedule(resetTask, hostRetryIntervalTimeUnit.toMillis(hostRetryInterval));
}
Expand Down
Expand Up @@ -36,7 +36,7 @@
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import fm.last.moji.time.Clock;
import fm.last.commons.lang.time.Clock;
import fm.last.moji.tracker.pool.ManagedTrackerHost.ResetTask;

@RunWith(MockitoJUnitRunner.class)
Expand Down

0 comments on commit d6fbbe9

Please sign in to comment.