1 9 package org.ozoneDB.core; 10 11 12 22 public abstract class ServerComponent { 23 24 protected transient Env env; 25 26 private boolean hasChanged; 27 28 29 public ServerComponent( Env env ) { 30 this.env = env; 31 } 32 33 34 public synchronized void setChanged() { 35 this.hasChanged = true; 36 env.storeSetup(); 37 } 38 39 40 public boolean hasChanged() { 41 return this.hasChanged; 42 } 43 44 45 public synchronized void clearChanged() { 46 this.hasChanged = false; 47 } 48 49 52 public abstract void startup() throws Exception ; 53 54 public abstract void shutdown() throws Exception ; 55 56 57 60 public abstract void save() throws Exception ; 61 62 } 63 64 | Popular Tags |