1 21 package com.db4o; 22 23 import com.db4o.config.*; 24 import com.db4o.ext.*; 25 import com.db4o.inside.convert.*; 26 import com.db4o.types.*; 27 28 38 public class YapObjectCarrier extends YapMemoryFile { 39 40 YapObjectCarrier (Configuration config,YapStream a_callingStream, MemoryFile memoryFile) { 41 super(config,a_callingStream, memoryFile); 42 } 43 44 protected void initialize1(Configuration config){ 45 i_handlers = i_parent.i_handlers; 46 _classCollection = i_parent.classCollection(); 47 i_config = i_parent.configImpl(); 48 i_references = new YapReferences(this); 49 initialize2(); 50 } 51 52 void initialize2NObjectCarrier(){ 53 } 55 56 void initializeEssentialClasses(){ 57 } 59 60 void initialize4NObjectCarrier(){ 61 } 63 64 void initNewClassCollection(){ 65 } 67 68 boolean canUpdate(){ 69 return false; 70 } 71 72 void configureNewFile() { 73 } 75 76 public int converterVersion() { 77 return Converter.VERSION; 78 } 79 80 public boolean close() { 81 82 85 synchronized (i_lock) { 86 boolean ret = close1(); 87 if (ret) { 88 i_config = null; 89 } 90 return ret; 91 } 92 } 93 94 final public Transaction newTransaction(Transaction parentTransaction) { 95 if (null != parentTransaction) { 96 return parentTransaction; 97 } 98 return new TransactionObjectCarrier(this, null); 99 } 100 101 public long currentVersion(){ 102 return 0; 103 } 104 105 public Db4oType db4oTypeStored(Transaction a_trans, Object a_object) { 106 return null; 107 } 108 109 public boolean dispatchsEvents() { 110 return false; 111 } 112 113 protected void finalize() { 114 } 116 117 118 public final void free(int a_address, int a_length){ 119 } 121 122 public int getSlot(int length){ 123 return appendBlocks(length); 124 } 125 126 public Db4oDatabase identity() { 127 return i_parent.identity(); 128 } 129 130 public boolean maintainsIndices(){ 131 return false; 132 } 133 134 void message(String msg){ 135 } 137 138 public void raiseVersion(long a_minimumVersion){ 139 } 141 142 void readThis(){ 143 } 145 146 boolean stateMessages(){ 147 return false; } 149 150 public void write(boolean shuttingDown) { 151 checkNeededUpdates(); 152 writeDirty(); 153 getTransaction().commit(); 154 } 155 156 final void writeHeader(boolean shuttingDown) { 157 } 159 160 protected void writeVariableHeader(){ 161 162 } 163 164 165 } | Popular Tags |