List of usage examples for org.apache.lucene.store BufferedChecksum BufferedChecksum
public BufferedChecksum(Checksum in)
From source file:cn.codepub.redis.directory.io.RedisOutputStream.java
License:Apache License
private RedisOutputStream(String indexFileName, InputOutputStream inputOutputStream, boolean checksum) { super(indexFileName); this.currentBufferIndex = -1; this.currentBuffer = null; this.indexFileName = indexFileName; this.redisFile = new RedisFile(); this.inputOutputStream = inputOutputStream; if (checksum) { crc = new BufferedChecksum(new CRC32()); } else {//ww w . j a v a2s . co m crc = null; } }
From source file:com.github.lucene.store.jdbc.index.RAMAndFileJdbcIndexOutput.java
License:Apache License
public RAMAndFileJdbcIndexOutput() { super("RAMAndFileJdbcIndexOutput"); crc = new BufferedChecksum(new CRC32()); }
From source file:it.agilelab.bigdata.spark.search.impl.BigChunksRAMOutputStream.java
License:Apache License
/** Creates this, with specified name. */ public BigChunksRAMOutputStream(String name, BigChunksRAMFile f, boolean checksum) { // FIXME: should be super("RAMOutputStream(name=\"" + name + "\")", name);, but constructor is protected super("RAMOutputStream", name); file = f;/*from w w w. j ava2 s. co m*/ // make sure that we switch to the // first needed buffer lazily currentBufferIndex = -1; currentBuffer = null; if (checksum) { crc = new BufferedChecksum(new CRC32()); } else { crc = null; } }
From source file:org.elasticsearch.index.translog.BufferedChecksumStreamInput.java
License:Apache License
public BufferedChecksumStreamInput(StreamInput in) { this.in = in; this.digest = new BufferedChecksum(new CRC32()); }
From source file:org.elasticsearch.index.translog.BufferedChecksumStreamOutput.java
License:Apache License
public BufferedChecksumStreamOutput(StreamOutput out) { this.out = out; this.digest = new BufferedChecksum(new CRC32()); }