}
}
@Override
public void writeCurrentBufferPartition(int newCurrentBufferPartition) {
PartitionMetaData existingPartitionMetaData = getPartitionMetaData(this.currentPartition);
PartitionMetaData newPartitionMetaData = getPartitionMetaData(newCurrentBufferPartition);
if (existingPartitionMetaData != null) {
existingPartitionMetaData.setCurrentPartition(false);
}
if (newPartitionMetaData == null) {
newPartitionMetaData = new PartitionMetaData(newCurrentBufferPartition);
synchronized(this) {
this.partitionMetaDatas[newCurrentBufferPartition] = newPartitionMetaData;
}
}
newPartitionMetaData.setCurrentPartition(true);
boolean failed = false;
try {
if (existingPartitionMetaData != null) {
getMetaStoreIndex().putNoReturn(existingPartitionMetaData);