rename AbstractWorldGenTaskTracker.isValid -> isMemoryAddressValid
This commit is contained in:
@@ -316,7 +316,7 @@ public class DataMetaFile extends AbstractMetaDataFile
|
||||
private boolean applyWriteQueue(ILodDataSource data) {
|
||||
// Poll the write queue
|
||||
// First check if write queue is empty, then swap the write queue.
|
||||
// Must be done in this order to ensure isValid work properly. See isValid() for details.
|
||||
// Must be done in this order to ensure isMemoryAddressValid work properly. See isMemoryAddressValid() for details.
|
||||
boolean isEmpty = writeQueue.get().queue.isEmpty();
|
||||
if (!isEmpty) {
|
||||
swapWriteQueue();
|
||||
|
||||
@@ -155,7 +155,7 @@ public class GeneratedDataFileHandler extends DataFileHandler
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isValid() { return this.targetData.get() != null; }
|
||||
public boolean isMemoryAddressValid() { return this.targetData.get() != null; }
|
||||
|
||||
@Override
|
||||
public Consumer<ChunkSizedData> getConsumer()
|
||||
|
||||
@@ -368,7 +368,7 @@ public class WorldGenerationQueue implements Closeable
|
||||
while (taskIter.hasNext())
|
||||
{
|
||||
WorldGenTask task = taskIter.next();
|
||||
if (!task.taskTracker.isValid())
|
||||
if (!task.taskTracker.isMemoryAddressValid())
|
||||
{
|
||||
taskIter.remove();
|
||||
task.future.complete(false);
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ public abstract class AbstractWorldGenTaskTracker
|
||||
* Returns true if the task hasn't been garbage collected. <br>
|
||||
* TODO rename to fit the above description better
|
||||
*/
|
||||
public abstract boolean isValid();
|
||||
public abstract boolean isMemoryAddressValid();
|
||||
|
||||
public abstract Consumer<ChunkSizedData> getConsumer();
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class SplitTaskTracker extends AbstractWorldGenTaskTracker
|
||||
return false;
|
||||
}
|
||||
|
||||
this.isValid = this.parentTracker.isValid();
|
||||
this.isValid = this.parentTracker.isMemoryAddressValid();
|
||||
if (!this.isValid)
|
||||
{
|
||||
this.parentFuture.complete(false);
|
||||
@@ -49,7 +49,7 @@ public class SplitTaskTracker extends AbstractWorldGenTaskTracker
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() { return this.isValid; }
|
||||
public boolean isMemoryAddressValid() { return this.isValid; }
|
||||
|
||||
@Override
|
||||
public Consumer<ChunkSizedData> getConsumer() { return this.parentTracker.getConsumer(); }
|
||||
|
||||
Reference in New Issue
Block a user