KahaRewrittenDataFileCommand compactionMarker = new KahaRewrittenDataFileCommand(); compactionMarker.setSourceDataFileId(journalToRead); compactionMarker.setRewriteType(forwardsFile.getTypeCode());
protected void process(KahaRewrittenDataFileCommand command, Location location) throws IOException { final TreeSet<Integer> completeFileSet = new TreeSet<>(journal.getFileMap().keySet()); // Mark the current journal file as a compacted file so that gc checks can skip // over logs that are smaller compaction type logs. DataFile current = journal.getDataFileById(location.getDataFileId()); current.setTypeCode(command.getRewriteType()); if (completeFileSet.contains(command.getSourceDataFileId()) && command.getSkipIfSourceExists()) { // Move offset so that next location read jumps to next file. location.setOffset(journalMaxFileLength); } }
public int hashCode() { int rc=-1065231344; if (hasSourceDataFileId()) { rc ^= ( -315365732^getSourceDataFileId() ); } if (hasRewriteType()) { rc ^= ( -1100466490^getRewriteType() ); } if (hasSkipIfSourceExists()) { rc ^= ( -120419949^ (getSkipIfSourceExists()? 3:-3) ); } return rc; }
public KahaRewrittenDataFileCommand mergeFrom(KahaRewrittenDataFileCommand other) { if (other.hasSourceDataFileId()) { setSourceDataFileId(other.getSourceDataFileId()); } if (other.hasRewriteType()) { setRewriteType(other.getRewriteType()); } if (other.hasSkipIfSourceExists()) { setSkipIfSourceExists(other.getSkipIfSourceExists()); } return this; }
public static KahaRewrittenDataFileCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRewrittenDataFileCommand().mergeUnframed(data).checktInitialized(); }
public static KahaRewrittenDataFileCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRewrittenDataFileCommand().mergeFramed(data).checktInitialized(); }
public void clear() { super.clear(); clearSourceDataFileId(); clearRewriteType(); clearSkipIfSourceExists(); }
public KahaRewrittenDataFileCommand clone() { return new KahaRewrittenDataFileCommand().mergeFrom(this); }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaRewrittenDataFileCommand.class ) return false; return equals((KahaRewrittenDataFileCommand)obj); }
return new KahaDestroySchedulerCommand(); case KAHA_REWRITTEN_DATA_FILE_COMMAND: return new KahaRewrittenDataFileCommand(); default: return null;
public int hashCode() { int rc=-1065231344; if (hasSourceDataFileId()) { rc ^= ( -315365732^getSourceDataFileId() ); } if (hasRewriteType()) { rc ^= ( -1100466490^getRewriteType() ); } if (hasSkipIfSourceExists()) { rc ^= ( -120419949^ (getSkipIfSourceExists()? 3:-3) ); } return rc; }
public KahaRewrittenDataFileCommand mergeFrom(KahaRewrittenDataFileCommand other) { if (other.hasSourceDataFileId()) { setSourceDataFileId(other.getSourceDataFileId()); } if (other.hasRewriteType()) { setRewriteType(other.getRewriteType()); } if (other.hasSkipIfSourceExists()) { setSkipIfSourceExists(other.getSkipIfSourceExists()); } return this; }
public static KahaRewrittenDataFileCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaRewrittenDataFileCommand().mergeUnframed(data).checktInitialized(); }
public static KahaRewrittenDataFileCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaRewrittenDataFileCommand().mergeFramed(data).checktInitialized(); }
public void clear() { super.clear(); clearSourceDataFileId(); clearRewriteType(); clearSkipIfSourceExists(); }
public KahaRewrittenDataFileCommand clone() { return new KahaRewrittenDataFileCommand().mergeFrom(this); }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaRewrittenDataFileCommand.class ) return false; return equals((KahaRewrittenDataFileCommand)obj); }
return new KahaDestroySchedulerCommand(); case KAHA_REWRITTEN_DATA_FILE_COMMAND: return new KahaRewrittenDataFileCommand(); default: return null;
public int hashCode() { int rc=-1065231344; if (hasSourceDataFileId()) { rc ^= ( -315365732^getSourceDataFileId() ); } if (hasRewriteType()) { rc ^= ( -1100466490^getRewriteType() ); } if (hasSkipIfSourceExists()) { rc ^= ( -120419949^ (getSkipIfSourceExists()? 3:-3) ); } return rc; }
public KahaRewrittenDataFileCommand mergeFrom(KahaRewrittenDataFileCommand other) { if (other.hasSourceDataFileId()) { setSourceDataFileId(other.getSourceDataFileId()); } if (other.hasRewriteType()) { setRewriteType(other.getRewriteType()); } if (other.hasSkipIfSourceExists()) { setSkipIfSourceExists(other.getSkipIfSourceExists()); } return this; }