クラス org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn

すべてのメンバ一覧

説明

A CacheDatabaseColumn represents a column of a database table. It is composed of a DatabaseColumn object and an ArrayList of cache entries.

作者:
Emmanuel Cecchet

Julie Marguerite

Sara Bouchenak

バージョン:
1.0

CacheDatabaseColumn.java46 行で定義されています。

Public メソッド

 CacheDatabaseColumn (String name)
String getName ()
boolean equals (Object other)
synchronized void addCacheEntry (CacheEntry ce)
synchronized void markDirtyAllNonUnique ()
synchronized void invalidateAll ()
synchronized void invalidateAllNonUnique ()
synchronized void invalidateAllUniqueWithValuesAndAllNonUnique (String val, ArrayList columns, ArrayList values)
synchronized void invalidateAllNonUniqueAndMarkDirtyUnique ()
String getInformation ()

Private 変数

String name
ArrayList cacheEntries


コンストラクタとデストラクタ

org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.CacheDatabaseColumn String  name  ) 
 

Creates a new CacheDatabaseColumn instance.

引数:
name name of the column
CacheDatabaseColumn.java56 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.cacheEntries.

00057 { 00058 this.name = name; 00059 cacheEntries = new ArrayList(); 00060 }


メソッド

synchronized void org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.addCacheEntry CacheEntry  ce  ) 
 

Adds a CacheEntry object whose consistency depends on this column.

引数:
ce a ResultCacheEntry value
CacheDatabaseColumn.java93 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.cacheEntries.

参照元 org.objectweb.cjdbc.controller.cache.result.ResultCacheColumnUnique.processAddToCache(), と org.objectweb.cjdbc.controller.cache.result.ResultCacheColumn.processAddToCache().

00094 { 00095 cacheEntries.add(ce); 00096 }

boolean org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.equals Object  other  ) 
 

Two CacheDatabaseColumn are equals if they have the same DatabaseColumn.

引数:
other the object to compare with
戻り値:
true if the objects are the same
CacheDatabaseColumn.java79 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.getName(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.name.

参照元 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.mergeColumns().

00080 { 00081 if (!(other instanceof CacheDatabaseColumn)) 00082 return false; 00083 00084 return name.equals(((CacheDatabaseColumn) other).getName()); 00085 }

String org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.getInformation  ) 
 

Returns the column name.

戻り値:
a String value
CacheDatabaseColumn.java254 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.name.

参照元 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.getInformation().

00255 { 00256 return name; 00257 }

String org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.getName  ) 
 

Gets the column name.

戻り値:
the column name
CacheDatabaseColumn.java67 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.name.

参照元 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.equals(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.getColumn(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAllUniqueWithValuesAndAllNonUnique(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.mergeColumns().

00068 { 00069 return name; 00070 }

synchronized void org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAll  ) 
 

Invalidates all cache entries depending on this column. CacheDatabaseColumn.java118 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.cacheEntries, と org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.invalidate().

参照元 org.objectweb.cjdbc.controller.cache.result.ResultCacheColumnUnique.processWriteNotify(), と org.objectweb.cjdbc.controller.cache.result.ResultCacheColumn.processWriteNotify().

00119 { 00120 for (Iterator i = cacheEntries.iterator(); i.hasNext();) 00121 { 00122 CacheEntry entry = (CacheEntry) i.next(); 00123 entry.invalidate(); 00124 } 00125 cacheEntries.clear(); 00126 }

synchronized void org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAllNonUnique  ) 
 

Invalidates all cache entries depending on this column that are non UNIQUE. CacheDatabaseColumn.java131 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.cacheEntries, org.objectweb.cjdbc.common.sql.AbstractRequest.getCacheAbility(), org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.getRequest(), と org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.invalidate().

参照元 org.objectweb.cjdbc.controller.cache.result.ResultCacheColumnUnique.processWriteNotify().

00132 { 00133 // Do not try to optimize by moving cacheEntries.size() 00134 // out of the for statement 00135 for (int i = 0; i < cacheEntries.size();) 00136 { 00137 CacheEntry ce = (CacheEntry) cacheEntries.get(i); 00138 if (ce.getRequest().getCacheAbility() != RequestType.UNIQUE_CACHEABLE) 00139 { 00140 ce.invalidate(); 00141 cacheEntries.remove(i); 00142 } 00143 else 00144 { 00145 i++; 00146 } 00147 } 00148 }

synchronized void org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAllNonUniqueAndMarkDirtyUnique  ) 
 

Invalidates all cache entries depending on this column that are non UNIQUE and mark dirty UNIQUE queries. CacheDatabaseColumn.java231 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.cacheEntries, org.objectweb.cjdbc.common.sql.AbstractRequest.getCacheAbility(), org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.getRequest(), org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.invalidate(), org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.isValid(), と org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.markDirty().

00232 { 00233 // Do not try to optimize by moving cacheEntries.size() 00234 // out of the for statement 00235 for (int i = 0; i < cacheEntries.size(); i++) 00236 { 00237 CacheEntry ce = (CacheEntry) cacheEntries.get(i); 00238 if ((ce.getRequest().getCacheAbility() != RequestType.UNIQUE_CACHEABLE) 00239 && ce.isValid()) 00240 ce.markDirty(); 00241 else 00242 { 00243 ce.invalidate(); 00244 cacheEntries.remove(i); 00245 } 00246 } 00247 }

synchronized void org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAllUniqueWithValuesAndAllNonUnique String  val,
ArrayList  columns,
ArrayList  values
 

Invalidates all cache entries depending on this column that are either non- unique or unique and associated with given values.

引数:
val a String representing the value of the current column.
columns an ArrayList of CacheDatabaseColumn objects
values an ArrayList of String objects representing values.
CacheDatabaseColumn.java160 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.cacheEntries, org.objectweb.cjdbc.common.sql.AbstractRequest.getCacheAbility(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.getName(), org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.getRequest(), org.objectweb.cjdbc.common.sql.SelectRequest.getWhereValues(), org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.invalidate(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.name.

00164 { 00165 // Do not try to optimize by moving cacheEntries.size() 00166 // out of the for statement 00167 for (int i = 0; i < cacheEntries.size();) 00168 { 00169 CacheEntry ce = (CacheEntry) cacheEntries.get(i); 00170 if (ce.getRequest().getCacheAbility() == RequestType.UNIQUE_CACHEABLE) 00171 { 00172 Hashtable queryValues; 00173 String value, v; 00174 SelectRequest query; 00175 int size, j; 00176 00177 query = ce.getRequest(); 00178 queryValues = query.getWhereValues(); 00179 // queryValues != null in a UNIQUE_CACHEABLE request 00180 value = (String) queryValues.get(this.name); 00181 if (value.compareToIgnoreCase(val) == 0) 00182 { 00183 // The value associated with this column in the WHERE clause 00184 // of the UNIQUE SELECT query equals val: 00185 // Check if the values associated with the other columns are equal. 00186 size = values.size(); 00187 j = 0; 00188 for (Iterator it = columns.iterator(); 00189 it.hasNext() && (j < size); 00190 j++) 00191 { 00192 CacheDatabaseColumn cdc = (CacheDatabaseColumn) it.next(); 00193 if (!this.equals(cdc)) 00194 { 00195 v = (String) values.get(j); 00196 value = (String) queryValues.get(cdc.getName()); 00197 if (value.compareToIgnoreCase(v) != 0) 00198 { 00199 // UNIQUE_CACHEABLE request with a different value 00200 // Do not invalidate it 00201 return; 00202 } 00203 } 00204 } 00205 // UNIQUE_CACHEABLE request with same values 00206 // Invalidate it 00207 ce.invalidate(); 00208 cacheEntries.remove(i); 00209 } 00210 else 00211 { 00212 // UNIQUE_CACHEABLE request with a different value 00213 // Do not invalidate it 00214 i++; 00215 } 00216 } 00217 else 00218 { 00219 // NON UNIQUE_CACHEABLE request 00220 // Invalidate it 00221 ce.invalidate(); 00222 cacheEntries.remove(i); 00223 } 00224 } 00225 }

synchronized void org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.markDirtyAllNonUnique  ) 
 

Marks dirty all valid cache entries depending on this colum that are non unique. CacheDatabaseColumn.java102 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.cacheEntries, org.objectweb.cjdbc.common.sql.AbstractRequest.getCacheAbility(), org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.getRequest(), org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.isValid(), と org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.markDirty().

00103 { 00104 // Do not try to optimize by moving cacheEntries.size() 00105 // out of the for statement 00106 for (int i = 0; i < cacheEntries.size(); i++) 00107 { 00108 CacheEntry ce = (CacheEntry) cacheEntries.get(i); 00109 if ((ce.getRequest().getCacheAbility() != RequestType.UNIQUE_CACHEABLE) 00110 && ce.isValid()) 00111 ce.markDirty(); 00112 } 00113 }


変数

ArrayList org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.cacheEntries [private]
 

CacheDatabaseColumn.java49 行で定義されています。

参照元 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.addCacheEntry(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.CacheDatabaseColumn(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAll(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAllNonUnique(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAllNonUniqueAndMarkDirtyUnique(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAllUniqueWithValuesAndAllNonUnique(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.markDirtyAllNonUnique().

String org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.name [private]
 

CacheDatabaseColumn.java48 行で定義されています。

参照元 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.equals(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.getInformation(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.getName(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseColumn.invalidateAllUniqueWithValuesAndAllNonUnique().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:39 2004に生成されました。 doxygen 1.3.8