From 35463f0a916da67afa96909112b0314e25d4432f Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 31 Aug 2007 17:55:26 +0000
Subject: [PATCH] Add support into the JE backend that can be used to store its compact schema encoding data in the database itself, and re-enable compact encoding by default in the configuration. By storing the compact schema encoding data in the database (a separate copy for each backend), we have eliminated the potential problems in backup/restore and binary copy initialization if there are dependencies on an external schematokens.dat file.
---
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java
index b071878..0d17c79 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java
@@ -105,6 +105,13 @@
private AtomicLong nextid = new AtomicLong(1);
/**
+ * The compressed schema manager for this backend.
+ */
+ private JECompressedSchema compressedSchema;
+
+
+
+ /**
* Creates a new RootContainer object. Each root container represents a JE
* environment.
*
@@ -119,6 +126,7 @@
this.entryContainers = new ConcurrentHashMap<DN, EntryContainer>();
this.backend = backend;
this.config = config;
+ this.compressedSchema = null;
config.addJEChangeListener(this);
}
@@ -217,6 +225,7 @@
TRACER.debugInfo("Free memory in heap: %d bytes", heapFreeSize);
}
+ compressedSchema = new JECompressedSchema(env);
openAndRegisterEntryContainers(config.getBackendBaseDN());
}
@@ -322,6 +331,16 @@
}
/**
+ * Retrieves the compressed schema manager for this backend.
+ *
+ * @return The compressed schema manager for this backend.
+ */
+ public JECompressedSchema getCompressedSchema()
+ {
+ return compressedSchema;
+ }
+
+ /**
* Get the DatabaseEnvironmentMonitor object for JE environment used by this
* root container.
*
@@ -493,6 +512,8 @@
}
}
+ compressedSchema.close();
+
if (env != null)
{
env.close();
--
Gitblit v1.10.0