1 22 package org.jboss.metadata.spi.retrieval; 23 24 import java.util.concurrent.atomic.AtomicLong ; 25 26 32 public class ValidTime 33 { 34 35 private static final long serialVersionUID = 1075815265759870744L; 36 37 38 private static final AtomicLong next = new AtomicLong (Long.MIN_VALUE); 39 40 41 private volatile long value; 42 43 46 public ValidTime() 47 { 48 value = next.get(); 49 } 50 51 56 public long getValidTime() 57 { 58 return value; 59 } 60 61 64 public void invalidate() 65 { 66 value = next.incrementAndGet(); 67 } 68 } 69 | Popular Tags |