Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JENKINS-44579 avoid performance issues on delete by lazily removing f…
…avorites that have been deleted
- Loading branch information
James Dumay
committed
Jun 1, 2017
1 parent
2a30820
commit 3c1e5ac
Showing
5 changed files
with
128 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package hudson.plugins.favorite.user; | ||
|
||
import com.google.common.annotations.VisibleForTesting; | ||
|
||
class Clock { | ||
private final Long time; | ||
|
||
public Clock() { | ||
this(Long.MIN_VALUE); | ||
} | ||
|
||
@VisibleForTesting | ||
public Clock(Long time) { | ||
this.time = time; | ||
} | ||
|
||
public long getTime() { | ||
return time == Long.MIN_VALUE ? System.currentTimeMillis() : time; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters