MCPcopy Index your code
hub / github.com/JetBrains/xodus

github.com/JetBrains/xodus @v2.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.1 ↗ · + Follow
10,696 symbols 39,103 edges 970 files 776 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

official JetBrains project Maven Central Last Release TeamCity (build status) License Pure Java + Kotlin Stack Overflow

JetBrains Xodus is a transactional schema-less embedded database that is written in Java and Kotlin. It was initially developed for JetBrains YouTrack, an issue tracking and project management tool. Xodus is also used in JetBrains Hub, the user management platform for JetBrains' team tools, and in some internal JetBrains projects.

  • Xodus is transactional and fully ACID-compliant.
  • Xodus is highly concurrent. Reads are completely non-blocking due to MVCC and true snapshot isolation.
  • Xodus is schema-less and agile. It does not require schema migrations or refactorings.
  • Xodus is embedded. It does not require installation or administration.
  • Xodus is written in pure Java and Kotlin.
  • Xodus is free and licensed under Apache 2.0.

Hello Worlds!

To start using Xodus, define dependencies:


<dependency>
    <groupId>org.jetbrains.xodus</groupId>
    <artifactId>xodus-openAPI</artifactId>
    <version>2.0.1</version>
</dependency>
// in Gradle project
dependencies {
    compile 'org.jetbrains.xodus:xodus-openAPI:2.0.1'
}

Read more about managing dependencies.

There are three different ways to deal with data, which results in three different API layers: Environments, Entity Stores and Virtual File Systems.

Environments

Add dependency on org.jetbrains.xodus:xodus-environment:2.0.1.

try (Environment env = Environments.newInstance("/home/me/.myAppData")) {
    env.executeInTransaction(txn -> {
        final Store store = env.openStore("Messages", StoreConfig.WITHOUT_DUPLICATES, txn);
        store.put(txn, StringBinding.stringToEntry("Hello"), StringBinding.stringToEntry("World!"));
    });
}

Entity Stores

Add dependency on org.jetbrains.xodus:xodus-entity-store:2.0.1, org.jetbrains.xodus:xodus-environment:2.0.1 and org.jetbrains.xodus:xodus-vfs:2.0.1.

try (PersistentEntityStore entityStore = PersistentEntityStores.newInstance("/home/me/.myAppData")) {
    entityStore.executeInTransaction(txn -> {
        final Entity message = txn.newEntity("Message");
        message.setProperty("hello", "World!");
    });
}

Virtual File Systems

Add dependency on org.jetbrains.xodus:xodus-vfs:2.0.1 and org.jetbrains.xodus:xodus-environment:2.0.1.

try (Environment env = Environments.newInstance("/home/me/.myAppData")) {
    final VirtualFileSystem vfs = new VirtualFileSystem(env);
    env.executeInTransaction(txn -> {
        final File file = vfs.createFile(txn, "Messages");
        try (DataOutputStream output = new DataOutputStream(vfs.writeFile(txn, file))) {
            output.writeUTF("Hello ");
            output.writeUTF("World!");
        } catch (IOException e) {
            throw new ExodusException(e);
        }
    });
    vfs.shutdown();
}

Building from Source

Gradle is used to build, test, and publish. JDK 1.8 or higher is required. To build the project, run:

./gradlew build

To assemble JARs and skip running tests, run:

./gradlew assemble

Find out More

Extension points exported contracts — how you extend this code

StoreTransactionalExecutable (Interface)
A function that can pe passed to the {@linkplain PersistentEntityStore#executeInTransaction(StoreTransactionalExecutable [36 …
openAPI/src/main/java/jetbrains/exodus/entitystore/StoreTransactionalExecutable.java
CriticalSection (Interface)
(no doc) [56 implementers]
utils/src/main/java/jetbrains/exodus/core/dataStructures/ObjectCacheBase.java
Loggable (Interface)
For writing a loggable to log, instance should provide only type, data and its length. If the instance is read from [4 …
environment/src/main/java/jetbrains/exodus/log/Loggable.java
MemberMetaData (Interface)
(no doc) [21 implementers]
query/src/main/java/jetbrains/exodus/query/metadata/MemberMetaData.java
PersistentStoreTransactionalExecutable (Interface)
(no doc) [36 implementers]
entity-store/src/test/java/jetbrains/exodus/entitystore/EntityStoreTestBase.java
ClusterConverter (Interface)
Converts raw data on read, and source data on write. E.g., raw data can be compressed or/and encrypted. Source data is j [1 …
vfs/src/main/java/jetbrains/exodus/vfs/ClusterConverter.java
EncryptListener (Interface)
(no doc)
crypto/src/main/kotlin/jetbrains/exodus/crypto/convert/EncryptListener.kt
FileFactory (Interface)
(no doc)
multinode/src/main/kotlin/jetbrains/exodus/log/replication/FileFactory.kt

Core symbols most depended-on inside this repo

size
called by 462
openAPI/src/main/java/jetbrains/exodus/entitystore/EntityIterable.java
put
called by 420
environment/src/main/java/jetbrains/exodus/tree/ITreeMutable.java
newEntity
called by 375
openAPI/src/main/java/jetbrains/exodus/entitystore/StoreTransaction.java
hasNext
called by 266
environment/src/main/java/jetbrains/exodus/tree/LongIterator.java
iterator
called by 260
openAPI/src/main/java/jetbrains/exodus/env/Bitmap.java
flush
called by 254
openAPI/src/main/java/jetbrains/exodus/env/Transaction.java
size
called by 252
utils/src/main/java/jetbrains/exodus/core/dataStructures/persistent/PersistentLongMap.java
add
called by 243
environment/src/main/java/jetbrains/exodus/tree/ITreeMutable.java

Shape

Method 9,249
Class 1,151
Interface 150
Function 134
Enum 12

Languages

Java75%
Kotlin25%
TypeScript1%

Modules by API surface

entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java157 symbols
utils/src/main/java/jetbrains/exodus/core/dataStructures/persistent/AbstractPersistent23Tree.java152 symbols
openAPI/src/main/java/jetbrains/exodus/env/EnvironmentConfig.java142 symbols
entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentStoreTransaction.java138 symbols
environment/src/main/java/jetbrains/exodus/env/EnvironmentImpl.java95 symbols
openAPI/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreConfig.java83 symbols
utils/src/main/java/jetbrains/exodus/core/dataStructures/persistent/PersistentBitTreeLongMap.java68 symbols
entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/EntityIterableBase.java65 symbols
environment/src/main/kotlin/jetbrains/exodus/log/Log.kt62 symbols
entity-store/src/main/kotlin/jetbrains/exodus/entitystore/iterate/UpdatablePropertiesCachedInstanceIterable.kt60 symbols
entity-store/src/test/kotlin/jetbrains/exodus/entitystore/iterate/EntityIterableTests.kt58 symbols
entity-store/src/main/java/jetbrains/exodus/entitystore/management/EntityStoreConfig.java58 symbols

For agents

$ claude mcp add xodus \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page