-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #273 from FgForrest/lab-update
Lab update: cookie cache fix, namespaces by server name
- Loading branch information
Showing
16 changed files
with
127 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,13 +25,17 @@ | |
|
||
import io.evitadb.api.EvitaSessionContract; | ||
import io.evitadb.api.requestResponse.data.EntityContract; | ||
import io.evitadb.dataType.ClassifierType; | ||
import io.evitadb.utils.ClassifierUtils; | ||
import lombok.ToString; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* DTO contains base server wide settings for the evitaDB. | ||
* | ||
* @param name Name of the server. It's used for identification purposes only. | ||
* @param coreThreadCount Defines count of threads that are spun up in {@link java.util.concurrent.ExecutorService} for handling | ||
* input requests as well as maintenance tasks. The more catalog in Evita | ||
* DB there is, the higher count of thread count might be required. | ||
|
@@ -51,6 +55,7 @@ | |
* @author Jan Novotný ([email protected]), FG Forrest a.s. (c) 2022 | ||
*/ | ||
public record ServerOptions( | ||
@Nonnull String name, | ||
int coreThreadCount, | ||
int maxThreadCount, | ||
int threadPriority, | ||
|
@@ -61,6 +66,7 @@ public record ServerOptions( | |
boolean readOnly | ||
) { | ||
|
||
public static final String DEFAULT_SERVER_NAME = "evitaDB"; | ||
public static final int DEFAULT_CORE_THREAD_COUNT = Runtime.getRuntime().availableProcessors() * 10; | ||
public static final int DEFAULT_MAX_THREAD_COUNT = Runtime.getRuntime().availableProcessors() * 20; | ||
public static final int DEFAULT_THREAD_PRIORITY = 5; | ||
|
@@ -69,6 +75,10 @@ public record ServerOptions( | |
public static final int DEFAULT_KILL_TIMED_OUT_SHORT_RUNNING_THREADS_EVERY_SECONDS = 30; | ||
public static final int DEFAULT_CLOSE_SESSIONS_AFTER_SECONDS_OF_INACTIVITY = 60 * 20; | ||
|
||
public ServerOptions { | ||
ClassifierUtils.validateClassifierFormat(ClassifierType.SERVER_NAME, name); | ||
} | ||
|
||
/** | ||
* Builder for the server options. Recommended to use to avoid binary compatibility problems in the future. | ||
*/ | ||
|
@@ -85,6 +95,7 @@ public static ServerOptions.Builder builder(@Nonnull ServerOptions serverOptions | |
|
||
public ServerOptions() { | ||
this( | ||
DEFAULT_SERVER_NAME, | ||
DEFAULT_CORE_THREAD_COUNT, | ||
DEFAULT_MAX_THREAD_COUNT, | ||
DEFAULT_THREAD_PRIORITY, | ||
|
@@ -101,6 +112,7 @@ public ServerOptions() { | |
*/ | ||
@ToString | ||
public static class Builder { | ||
private String name = DEFAULT_SERVER_NAME; | ||
private int coreThreadCount = DEFAULT_CORE_THREAD_COUNT; | ||
private int maxThreadCount = DEFAULT_MAX_THREAD_COUNT; | ||
private int threadPriority = DEFAULT_THREAD_PRIORITY; | ||
|
@@ -124,6 +136,11 @@ public static class Builder { | |
this.readOnly = serverOptions.readOnly; | ||
} | ||
|
||
public ServerOptions.Builder name(@Nullable String name) { | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
public ServerOptions.Builder coreThreadCount(int coreThreadCount) { | ||
this.coreThreadCount = coreThreadCount; | ||
return this; | ||
|
@@ -166,6 +183,7 @@ public ServerOptions.Builder readOnly(boolean readOnly) { | |
|
||
public ServerOptions build() { | ||
return new ServerOptions( | ||
name, | ||
coreThreadCount, | ||
maxThreadCount, | ||
threadPriority, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...F/lab/gui/dist/assets/Default-4dbeee60.js → ...F/lab/gui/dist/assets/Default-755a37b3.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
...pi/evita_external_api_lab/src/main/resources/META-INF/lab/gui/dist/assets/Lab-5a391701.js
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...pi/evita_external_api_lab/src/main/resources/META-INF/lab/gui/dist/assets/Lab-7196b78e.js
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...-INF/lab/gui/dist/assets/Lab-075f6b5e.css → ...-INF/lab/gui/dist/assets/Lab-e0808450.css
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...NF/lab/gui/dist/assets/index-32b8896b.css → ...NF/lab/gui/dist/assets/index-7b1773b4.css
Large diffs are not rendered by default.
Oops, something went wrong.
142 changes: 71 additions & 71 deletions
142
...INF/lab/gui/dist/assets/index-01499516.js → ...INF/lab/gui/dist/assets/index-7e981242.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...NF/lab/gui/dist/assets/layout-fca9706e.js → ...NF/lab/gui/dist/assets/layout-3dd59540.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.