|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simBio.sim.analyzer.graph.results.CachedBuffer
public class CachedBuffer
キャッシュ機能付きの、時系列データバッファ.
本クラスは、ファイルをバッファにして、配列の時系列データを格納・取出しすることが
できます.
| Constructor Summary | |
|---|---|
CachedBuffer(java.io.File file)
|
|
| Method Summary | |
|---|---|
void |
addDoubles(double[] value)
double 配列を書き出す. |
void |
addLongs(long[] value)
long 配列を書き出す. |
void |
clear()
バッファの内容をクリアする. |
void |
close()
インスタンスを使用終了し、バッファファイルを開放する. |
protected void |
flushWriteCache()
書き込みキャッシュをディスクに書き出す。 |
long |
getCount()
書き込みバッファの使用容量を取得する. |
double |
getDouble(long index,
int targetSeries)
インデックスと系列番号を指定して、double値を読み込む |
long |
getLong(long index,
int targetSeries)
インデックスと系列番号を指定して、long値を読み込む |
void |
getPrepareDouble(long indexMin,
long indexMax)
先読みキャッシュにdouble値を読み込む. |
void |
getPrepareLong(long indexMin,
long indexMax)
先読みキャッシュにlong値を読み込む. |
protected org.simBio.sim.analyzer.graph.results.CachedBuffer.ReadCache |
getReadCache(long numReadPosition,
long numReadsRequired)
指定した位置のデータが読まれたキャッシュを取得する。 |
int |
getSeries()
系列数を取得する. |
int |
getWriteBufferCapacity()
書き込みバッファの容量を取得する. |
protected void |
loadCache(org.simBio.sim.analyzer.graph.results.CachedBuffer.ReadCache cache,
long numReadPosition,
long numReadsRequired)
キャッシュにデータを読み込む |
protected void |
loadCacheSub(org.simBio.sim.analyzer.graph.results.CachedBuffer.ReadCache cache,
long indexMin,
long indexMax,
int unitBytes)
キャッシュにデータを読み込む(内部メソッド) |
void |
setSeries(int i)
系列数を設定する. |
void |
setWriteBufferCapacity(int i)
書き込みバッファの容量を設定する. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CachedBuffer(java.io.File file)
throws java.io.IOException
file - バッファとして使用するファイル
java.io.IOException| Method Detail |
|---|
public void close()
throws java.io.IOException
java.io.IOException
public void clear()
throws java.io.IOException
java.io.IOException
protected void loadCache(org.simBio.sim.analyzer.graph.results.CachedBuffer.ReadCache cache,
long numReadPosition,
long numReadsRequired)
cache - 読み込まれるキャッシュオブジェクトnumReadPosition - 読み込み開始位置numReadsRequired - 読み込みバイト数
protected org.simBio.sim.analyzer.graph.results.CachedBuffer.ReadCache getReadCache(long numReadPosition,
long numReadsRequired)
numReadPosition - 読み込み開始位置numReadsRequired - 読み込みバイト数
protected void loadCacheSub(org.simBio.sim.analyzer.graph.results.CachedBuffer.ReadCache cache,
long indexMin,
long indexMax,
int unitBytes)
cache - 読み込まれるキャッシュオブジェクトindexMin - 読み込み開始要素indexMax - 読み込み最終要素unitBytes - 要素単位容量(バイト)
protected void flushWriteCache()
throws java.io.IOException
java.io.IOExceptionpublic void addDoubles(double[] value)
value - double 配列public void addLongs(long[] value)
value - long 配列
public void getPrepareDouble(long indexMin,
long indexMax)
indexMin - インデックス最小値indexMax - インデックス最大値
public double getDouble(long index,
int targetSeries)
index - インデックスtargetSeries - 系列番号(0..n-1)
public void getPrepareLong(long indexMin,
long indexMax)
indexMin - インデックス最小値indexMax - インデックス最大値
public long getLong(long index,
int targetSeries)
index - インデックスtargetSeries - 系列番号(0..n-1)
public void setSeries(int i)
i - 系列数public int getSeries()
public void setWriteBufferCapacity(int i)
i - 書き込みバッファの容量(実容量は、 i * 系列数 * データサイズ)public int getWriteBufferCapacity()
public long getCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||