--l4j-debug-all
build.gradle.kts проекта пришлось дополнить
plugins {
id("com.android.application") version "8.2.1" apply false
id("org.jetbrains.kotlin.android") version "1.9.10" apply false
id("org.jetbrains.kotlin.jvm") version "1.9.0" apply false
}
в такой же файл приложения
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}
android {
....
kotlinOptions {
jvmTarget = "1.8"
}
.....
}
dependencies {
implementation("androidx.core:core-ktx:1.12.0")
}
mysql -h 127.0.0.1 -u root -p
- и вас пустит в консоль с паролем root
?DEFAULT(-1),
READ_UNCOMMITTED(1),
READ_COMMITTED(2),
REPEATABLE_READ(4),
SERIALIZABLE(8);
что для REST серверов лучше Node не найтиэто твой главный неправильный вывод, лучший будет тот, который написан на технологии, которую лучше всего знает исполнитель.
Например стриминговый сервер или сервер для чата, он же относится к разряду типичных запрос/ответеще одна большая ошибка, вообще всё смешал в кучу, "стриминговый" это больше про максимальный pull c сервера, "чата" это про полноценный обмен в обе стороны, а "запрос/ответ" это про базовый http и он для этих обоих случаев, очень невыгодная стратегия, поэтому для них в http написаны свои частные протоколы, например, websocket для нормальной реализации чатов.
DeferredResult provides an alternative to using a Callable for asynchronous request processing. While a Callable is executed concurrently on behalf of the application, with a DeferredResult the application can produce the result from a thread of its choice.
Subclasses can extend this class to easily associate additional data or behavior with the DeferredResult. For example, one might want to associate the user used to create the DeferredResult by extending the class and adding an additional property for the user. In this way, the user could easily be accessed later without the need to use a data structure to do the mapping.
An example of associating additional behavior to this class might be realized by extending the class to implement an additional interface. For example, one might want to implement Comparable so that when the DeferredResult is added to a PriorityQueue it is handled in the correct order.
По факту заметил, что с DiferredRestult могу указывать сам пул потоков, а с Callable нет.
1с
1с * (кол-во потоков / 2)
class Scratch {
public static void main(String[] args) {
var a1 = new A();
var a2 = new A(10);
System.out.println(a1); // A{a=5}
System.out.println(a2); // A{a=10}
}
}
class A{
int a = 5; // default
public A(int a) {
this.a = a;
}
public A() {
}
@Override
public String toString() {
return "A{" +
"a=" + a +
'}';
}
}