/// <exception cref="System.IO.IOException"/> public virtual void WriteHistoryData(FileSystemApplicationHistoryStore.HistoryDataKey key, byte[] value) { lock (this) { DataOutputStream dos = null; try { dos = this.writer.PrepareAppendKey(-1); key.Write(dos); } finally { IOUtils.Cleanup(FileSystemApplicationHistoryStore.Log, dos); } try { dos = this.writer.PrepareAppendValue(value.Length); dos.Write(value); } finally { IOUtils.Cleanup(FileSystemApplicationHistoryStore.Log, dos); } } }
public Entry(HistoryFileReader _enclosing, FileSystemApplicationHistoryStore.HistoryDataKey key, byte[] value) { this._enclosing = _enclosing; this.key = key; this.value = value; }
/// <exception cref="System.IO.IOException"/> public virtual FileSystemApplicationHistoryStore.HistoryFileReader.Entry Next() { TFile.Reader.Scanner.Entry entry = this.scanner.Entry(); DataInputStream dis = entry.GetKeyStream(); FileSystemApplicationHistoryStore.HistoryDataKey key = new FileSystemApplicationHistoryStore.HistoryDataKey (); key.ReadFields(dis); dis = entry.GetValueStream(); byte[] value = new byte[entry.GetValueLength()]; dis.Read(value); this.scanner.Advance(); return(new FileSystemApplicationHistoryStore.HistoryFileReader.Entry(this, key, value )); }