public class MD5HashFileGenerator extends java.lang.Object implements HashFileGenerator
| Constructor and Description |
|---|
MD5HashFileGenerator() |
| Modifier and Type | Method and Description |
|---|---|
int |
getCacheMaxSize() |
int |
getExpireAfterWrite() |
java.lang.String |
getExpireAfterWriteUnit() |
static java.lang.String |
getMD5Checksum(java.io.InputStream is) |
com.google.common.base.Optional<java.lang.String> |
hash(com.google.common.base.Optional<java.net.URL> url)
Calculates a md5 hash for an url
If a passed in url is absent then this method will return absent as well
|
com.google.common.base.Optional<java.lang.String> |
hashMulti(java.util.Collection<java.net.URL> urls) |
void |
init() |
boolean |
isHotReloadMode() |
void |
setCacheMaxSize(int cacheMaxSize) |
void |
setExpireAfterWrite(int expireAfterWrite) |
void |
setExpireAfterWriteUnit(java.lang.String expireAfterWriteUnit) |
void |
setHotReloadMode(boolean hotReloadMode) |
public void init()
public com.google.common.base.Optional<java.lang.String> hash(com.google.common.base.Optional<java.net.URL> url)
throws java.io.IOException
hash in interface HashFileGeneratorurl - - an url to a soy template filejava.io.IOException - - in a case there is an IO error calculating md5 checksumpublic com.google.common.base.Optional<java.lang.String> hashMulti(java.util.Collection<java.net.URL> urls)
throws java.io.IOException
hashMulti in interface HashFileGeneratorjava.io.IOExceptionpublic static java.lang.String getMD5Checksum(java.io.InputStream is)
throws java.io.IOException
java.io.IOExceptionpublic void setHotReloadMode(boolean hotReloadMode)
public void setCacheMaxSize(int cacheMaxSize)
public void setExpireAfterWrite(int expireAfterWrite)
public void setExpireAfterWriteUnit(java.lang.String expireAfterWriteUnit)
public boolean isHotReloadMode()
public int getCacheMaxSize()
public int getExpireAfterWrite()
public java.lang.String getExpireAfterWriteUnit()