mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
chore: deprecate some methods that ought to be removed (#2340)
This commit is contained in:
parent
68eb4e214a
commit
685248d8de
@ -468,24 +468,6 @@ public class Settings extends Config {
|
|||||||
})
|
})
|
||||||
public int BUFFER_SIZE = 531441;
|
public int BUFFER_SIZE = 531441;
|
||||||
|
|
||||||
|
|
||||||
@Comment({
|
|
||||||
"The maximum time in milliseconds to wait for a chunk to load for an edit.",
|
|
||||||
" (50ms = 1 server tick, 0 = Fastest).",
|
|
||||||
" The default value of 100 should be safe for most cases.",
|
|
||||||
"",
|
|
||||||
"Actions which require loaded chunks (e.g. copy) which do not load in time",
|
|
||||||
" will use the last chunk as filler, which may appear as bands of duplicated blocks.",
|
|
||||||
"Actions usually wait about 25-50ms for the chunk to load, more if the server is lagging.",
|
|
||||||
"A value of 100ms does not force it to wait 100ms if the chunk loads in 10ms.",
|
|
||||||
"",
|
|
||||||
"This value is a timeout in case a chunk is never going to load (for whatever odd reason).",
|
|
||||||
"If the action times out, the operation continues by using the previous chunk as filler,",
|
|
||||||
" and displaying an error message. In this case, either copy a smaller section,",
|
|
||||||
" or increase chunk-wait-ms.",
|
|
||||||
"A value of 0 is faster simply because it doesn't bother loading the chunks or waiting.",
|
|
||||||
})
|
|
||||||
public int CHUNK_WAIT_MS = 1000;
|
|
||||||
@Comment("Delete history on disk after a number of days")
|
@Comment("Delete history on disk after a number of days")
|
||||||
public int DELETE_AFTER_DAYS = 7;
|
public int DELETE_AFTER_DAYS = 7;
|
||||||
@Comment("Delete history in memory on logout (does not effect disk)")
|
@Comment("Delete history in memory on logout (does not effect disk)")
|
||||||
@ -493,6 +475,7 @@ public class Settings extends Config {
|
|||||||
@Comment({
|
@Comment({
|
||||||
"If history should be enabled by default for plugins using WorldEdit:",
|
"If history should be enabled by default for plugins using WorldEdit:",
|
||||||
" - It is faster to have disabled",
|
" - It is faster to have disabled",
|
||||||
|
" - It is faster to have disabled",
|
||||||
" - Use of the FAWE API will not be effected"
|
" - Use of the FAWE API will not be effected"
|
||||||
})
|
})
|
||||||
public boolean ENABLE_FOR_CONSOLE = true;
|
public boolean ENABLE_FOR_CONSOLE = true;
|
||||||
@ -515,10 +498,12 @@ public class Settings extends Config {
|
|||||||
|
|
||||||
@Create
|
@Create
|
||||||
public static PROGRESS PROGRESS;
|
public static PROGRESS PROGRESS;
|
||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"This should equal the number of processors you have",
|
"This should equal the number of processors you have",
|
||||||
})
|
})
|
||||||
public int PARALLEL_THREADS = Math.max(1, Runtime.getRuntime().availableProcessors());
|
public int PARALLEL_THREADS = Math.max(1, Runtime.getRuntime().availableProcessors());
|
||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"When doing edits that effect more than this many chunks:",
|
"When doing edits that effect more than this many chunks:",
|
||||||
" - FAWE will start placing before all calculations are finished",
|
" - FAWE will start placing before all calculations are finished",
|
||||||
@ -530,14 +515,6 @@ public class Settings extends Config {
|
|||||||
|
|
||||||
})
|
})
|
||||||
public int TARGET_SIZE = 8 * Runtime.getRuntime().availableProcessors();
|
public int TARGET_SIZE = 8 * Runtime.getRuntime().availableProcessors();
|
||||||
@Comment({
|
|
||||||
"Force FAWE to start placing chunks regardless of whether an edit is finished processing",
|
|
||||||
" - A larger value will use slightly less CPU time",
|
|
||||||
" - A smaller value will reduce memory usage",
|
|
||||||
" - A value too small may break some operations (deform?)"
|
|
||||||
})
|
|
||||||
//TODO Find out where this was used and why the usage was removed
|
|
||||||
public int MAX_WAIT_MS = 1000;
|
|
||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"Increase or decrease queue intensity (ms) [-50,50]:",
|
"Increase or decrease queue intensity (ms) [-50,50]:",
|
||||||
@ -566,13 +543,6 @@ public class Settings extends Config {
|
|||||||
})
|
})
|
||||||
public boolean POOL = true;
|
public boolean POOL = true;
|
||||||
|
|
||||||
@Comment({
|
|
||||||
"Discard edits which have been idle for a certain amount of time (ms)",
|
|
||||||
" - E.g. A plugin creates an EditSession but never does anything with it",
|
|
||||||
" - This only applies to plugins improperly using WorldEdit's legacy API"
|
|
||||||
})
|
|
||||||
public int DISCARD_AFTER_MS = 60000;
|
|
||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"When using fastmode do not bother to tick existing/placed blocks/fluids",
|
"When using fastmode do not bother to tick existing/placed blocks/fluids",
|
||||||
"Only works in versions up to 1.17.1"
|
"Only works in versions up to 1.17.1"
|
||||||
@ -639,7 +609,7 @@ public class Settings extends Config {
|
|||||||
public boolean REMOVE_ENTITY_FROM_WORLD_ON_CHUNK_FAIL = true;
|
public boolean REMOVE_ENTITY_FROM_WORLD_ON_CHUNK_FAIL = true;
|
||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"Other experimental features"
|
"Increased debug logging for brush actions and processor setup"
|
||||||
})
|
})
|
||||||
public boolean OTHER = false;
|
public boolean OTHER = false;
|
||||||
|
|
||||||
|
@ -88,7 +88,10 @@ public abstract class TaskManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a bunch of tasks in parallel using the shared thread pool.
|
* Run a bunch of tasks in parallel using the shared thread pool.
|
||||||
|
*
|
||||||
|
* @deprecated Deprecated without replacement as unused internally, and poor implementation of what it's designed to do.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public void parallel(Collection<Runnable> runables) {
|
public void parallel(Collection<Runnable> runables) {
|
||||||
for (Runnable run : runables) {
|
for (Runnable run : runables) {
|
||||||
pool.submit(run);
|
pool.submit(run);
|
||||||
@ -101,8 +104,9 @@ public abstract class TaskManager {
|
|||||||
*
|
*
|
||||||
* @param runnables the tasks to run
|
* @param runnables the tasks to run
|
||||||
* @param numThreads number of threads (null = config.yml parallel threads)
|
* @param numThreads number of threads (null = config.yml parallel threads)
|
||||||
|
* @deprecated Deprecated without replacement as unused internally, and poor implementation of what it's designed to do.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public void parallel(Collection<Runnable> runnables, @Nullable Integer numThreads) {
|
public void parallel(Collection<Runnable> runnables, @Nullable Integer numThreads) {
|
||||||
if (runnables == null) {
|
if (runnables == null) {
|
||||||
return;
|
return;
|
||||||
@ -271,13 +275,17 @@ public abstract class TaskManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Deprecated without replacement as unused internally, and poor implementation of what it's designed to do.
|
||||||
|
*/
|
||||||
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public void wait(AtomicBoolean running, int timeout) {
|
public void wait(AtomicBoolean running, int timeout) {
|
||||||
try {
|
try {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
synchronized (running) {
|
synchronized (running) {
|
||||||
while (running.get()) {
|
while (running.get()) {
|
||||||
running.wait(timeout);
|
running.wait(timeout);
|
||||||
if (running.get() && System.currentTimeMillis() - start > Settings.settings().QUEUE.DISCARD_AFTER_MS) {
|
if (running.get() && System.currentTimeMillis() - start > 60000) {
|
||||||
new RuntimeException("FAWE is taking a long time to execute a task (might just be a symptom): ").printStackTrace();
|
new RuntimeException("FAWE is taking a long time to execute a task (might just be a symptom): ").printStackTrace();
|
||||||
LOGGER.info("For full debug information use: /fawe threads");
|
LOGGER.info("For full debug information use: /fawe threads");
|
||||||
}
|
}
|
||||||
@ -288,6 +296,10 @@ public abstract class TaskManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Deprecated without replacement as unused internally, and poor implementation of what it's designed to do.
|
||||||
|
*/
|
||||||
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public void notify(AtomicBoolean running) {
|
public void notify(AtomicBoolean running) {
|
||||||
running.set(false);
|
running.set(false);
|
||||||
synchronized (running) {
|
synchronized (running) {
|
||||||
|
Loading…
Reference in New Issue
Block a user