Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
JournalMode.java
Go to the documentation of this file.
1
package
dev.rafex.ether.database.sqlite.config;
2
3
/*-
4
* #%L
5
* ether-database-sqlite
6
* %%
7
* Copyright (C) 2025 - 2026 Raúl Eduardo González Argote
8
* %%
9
* Permission is hereby granted, free of charge, to any person obtaining a copy
10
* of this software and associated documentation files (the "Software"), to deal
11
* in the Software without restriction, including without limitation the rights
12
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
* copies of the Software, and to permit persons to whom the Software is
14
* furnished to do so, subject to the following conditions:
15
*
16
* The above copyright notice and this permission notice shall be included in
17
* all copies or substantial portions of the Software.
18
*
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
* THE SOFTWARE.
26
* #L%
27
*/
28
29
/**
30
* SQLite journal modes.
31
* <p>
32
* Corresponds to the {@code PRAGMA journal_mode} setting.
33
*
34
* @see <a href="https://www.sqlite.org/pragma.html#pragma_journal_mode">PRAGMA journal_mode</a>
35
*/
36
public
enum
JournalMode
{
37
38
/**
39
* Write-Ahead Logging mode.
40
* <p>
41
* Allows concurrent reads and writes, with better performance for
42
* write-intensive workloads. The default and recommended mode for
43
* most applications.
44
*/
45
WAL
,
46
47
/**
48
* Rollback journal mode (default in SQLite < 3.7.0).
49
* <p>
50
* Creates a separate rollback journal file ({@code -journal}) that is
51
* deleted after each transaction.
52
*/
53
DELETE
,
54
55
/**
56
* Truncate journal mode.
57
* <p>
58
* Similar to {@code DELETE} but truncates the journal file to zero bytes
59
* instead of deleting it, which can be faster on some filesystems.
60
*/
61
TRUNCATE
,
62
63
/**
64
* Persistent journal mode.
65
* <p>
66
* The journal file is never deleted, only overwritten. Can be slightly
67
* faster than {@code DELETE} on filesystems where file creation is expensive.
68
*/
69
PERSIST
,
70
71
/**
72
* Memory journal mode.
73
* <p>
74
* The journal is kept in memory, not on disk. Transactions are atomic
75
* but not durable across application crashes.
76
*/
77
MEMORY
,
78
79
/**
80
* No journal mode.
81
* <p>
82
* No rollback journal is maintained. Transactions may be rolled back
83
* on application crash, leaving the database in an inconsistent state.
84
* <strong>Not recommended for production use.</strong>
85
*/
86
OFF
87
}
dev.rafex.ether.database.sqlite.config.JournalMode
SQLite journal modes.
Definition
JournalMode.java:36
dev.rafex.ether.database.sqlite.config.JournalMode.PERSIST
PERSIST
Persistent journal mode.
Definition
JournalMode.java:69
dev.rafex.ether.database.sqlite.config.JournalMode.WAL
WAL
Write-Ahead Logging mode.
Definition
JournalMode.java:45
dev.rafex.ether.database.sqlite.config.JournalMode.TRUNCATE
TRUNCATE
Truncate journal mode.
Definition
JournalMode.java:61
dev.rafex.ether.database.sqlite.config.JournalMode.OFF
OFF
No journal mode.
Definition
JournalMode.java:86
dev.rafex.ether.database.sqlite.config.JournalMode.DELETE
DELETE
Rollback journal mode (default in SQLite < 3.7.0).
Definition
JournalMode.java:53
dev.rafex.ether.database.sqlite.config.JournalMode.MEMORY
MEMORY
Memory journal mode.
Definition
JournalMode.java:77
Generated by
1.16.1