1 23 24 29 package com.sun.enterprise.management.support; 30 31 import java.io.File ; 32 import java.io.IOException ; 33 34 35 abstract class UpDownInfo 36 { 37 private final File mFile; 38 private Object mID; 39 private long mLastAccessTime; 40 41 42 public abstract void cleanup() throws IOException ; 43 public abstract boolean isDone(); 44 45 public 46 UpDownInfo( 47 final Object id, 48 final File theFile ) 49 { 50 mID = id; 51 mFile = theFile; 52 53 mLastAccessTime = System.currentTimeMillis(); 54 } 55 56 public final long 57 getLastUseTime() 58 { 59 return( mLastAccessTime ); 60 } 61 62 public final long 63 getMillisSinceLastAccess() 64 { 65 return( System.currentTimeMillis() - mLastAccessTime ); 66 } 67 68 protected void 69 accessed() 70 { 71 mLastAccessTime = System.currentTimeMillis(); 72 } 73 74 75 public final Object 76 getID() 77 { 78 return( mID ); 79 } 80 81 public File 82 getFile() 83 { 84 return( mFile ); 85 } 86 } 87 88 89 90 | Popular Tags |