|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonyericsson.hudson.plugins.gerrit.trigger.replication.ReplicationCache
public class ReplicationCache
Replication cache for RefReplicated events.
Field Summary | |
---|---|
static int |
DEFAULT_EXPIRATION_IN_MINUTES
Cache expiration in minutes. |
Constructor Summary | |
---|---|
ReplicationCache()
Default constructor. |
|
ReplicationCache(long expiration,
TimeUnit unit)
Constructor use by default constructor and for unit tests. |
Method Summary | |
---|---|
com.sonymobile.tools.gerrit.gerritevents.dto.events.RefReplicated |
getIfPresent(String gerritServer,
String gerritProject,
String ref,
String slaveHost)
Return the cached RefReplicated associated with the specified parameters, if found. |
boolean |
isExpired(long timestamp)
Returns if the specified time stamp is expired. |
void |
put(com.sonymobile.tools.gerrit.gerritevents.dto.events.RefReplicated refReplicated)
Cache the specified RefReplicated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_EXPIRATION_IN_MINUTES
Constructor Detail |
---|
public ReplicationCache()
public ReplicationCache(long expiration, TimeUnit unit)
expiration
- Cache expirationunit
- the unit that expiration is expressed inMethod Detail |
---|
public void put(com.sonymobile.tools.gerrit.gerritevents.dto.events.RefReplicated refReplicated)
refReplicated
- the event to cachepublic boolean isExpired(long timestamp)
timestamp
- the time stamp to check.
public com.sonymobile.tools.gerrit.gerritevents.dto.events.RefReplicated getIfPresent(String gerritServer, String gerritProject, String ref, String slaveHost)
gerritServer
- The gerritServergerritProject
- The gerritProjectref
- The refslaveHost
- The slaveHost
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |