1 package org.jboss.cache.eviction; 2 3 import org.jboss.cache.config.Dynamic; 4 5 8 public class ExpirationConfiguration extends EvictionPolicyConfigBase 9 { 10 11 private static final long serialVersionUID = 47338798734219507L; 12 13 16 public static final String EXPIRATION_KEY = "expiration"; 17 18 21 @Dynamic 22 private String expirationKeyName = EXPIRATION_KEY; 23 24 @Dynamic 25 private boolean warnNoExpirationKey = true; 26 27 @Dynamic 28 private int timeToLiveSeconds = 0; 29 30 public ExpirationConfiguration() 31 { 32 setEvictionPolicyClassName(); 33 } 34 35 @Override 36 protected void setEvictionPolicyClassName() 37 { 38 setEvictionPolicyClass(ExpirationPolicy.class.getName()); 39 } 40 41 45 public String getExpirationKeyName() 46 { 47 return expirationKeyName; 48 } 49 50 53 public void setExpirationKeyName(String expirationKeyName) 54 { 55 this.expirationKeyName = expirationKeyName; 56 } 57 58 61 public boolean getWarnNoExpirationKey() 62 { 63 return warnNoExpirationKey; 64 } 65 66 69 public void setWarnNoExpirationKey(boolean warnNoExpirationKey) 70 { 71 this.warnNoExpirationKey = warnNoExpirationKey; 72 } 73 74 public int getTimeToLiveSeconds() 75 { 76 return timeToLiveSeconds; 77 } 78 79 public void setTimeToLiveSeconds(int timeToLiveSeconds) 80 { 81 this.timeToLiveSeconds = timeToLiveSeconds; 82 } 83 84 } 85 | Popular Tags |