PersistentCompressedSchema.java revision f4fc21a222c514860b5232cce2d9f890639f5b5a
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2009 Sun Microsystems, Inc.
* Portions Copyright 2013-2015 ForgeRock AS.
*/
/**
* This class provides a compressed schema implementation whose definitions are
* persisted in a tree.
*/
final class PersistentCompressedSchema extends CompressedSchema
{
/** The name of the tree used to store compressed attribute description definitions. */
/** The name of the tree used to store compressed object class set definitions. */
/** The compressed attribute description schema tree. */
/** The compressed object class set schema tree. */
/** The storage in which the trees are held. */
/**
* Creates a new instance of this compressed schema manager.
*
* @param storage
* A reference to the storage in which the trees will be held.
* @param txn a non null transaction
*
* @throws StorageRuntimeException
* If a problem occurs while loading the compressed schema
* definitions from the tree.
* @throws InitializationException
* If an error occurs while loading and processing the compressed
* schema definitions.
*/
{
}
/** {@inheritDoc} */
protected void storeAttribute(final byte[] encodedAttribute,
throws DirectoryException
{
try
{
{
}
}
catch (final IOException e)
{
// TODO: Shouldn't happen but should log a message
}
}
/** {@inheritDoc} */
protected void storeObjectClasses(final byte[] encodedObjectClasses,
{
try
{
{
}
}
catch (final IOException e)
{
// TODO: Shouldn't happen but should log a message
}
}
{
// Cursor through the object class database and load the object class set
// definitions. At the same time, figure out the highest token value and
// initialize the object class counter to one greater than that.
try
{
{
while (reader.hasNextElement())
{
}
}
}
catch (final IOException e)
{
logger.traceException(e);
}
finally
{
}
// Cursor through the attribute description database and load the attribute
// set definitions.
try
{
{
while (reader.hasNextElement())
{
}
}
}
catch (final IOException e)
{
logger.traceException(e);
}
finally
{
}
}
throws DirectoryException
{
try
{
{
{
}
});
return true;
}
catch (final Exception e)
{
}
}
}