Search in sources :

Example 6 with BTreeManager

use of org.apache.jackrabbit.commons.flat.BTreeManager in project jackrabbit by apache.

the class ItemSequenceTest method testEmptyPropertySequence.

public void testEmptyPropertySequence() throws RepositoryException {
    Comparator<String> order = Rank.<String>comparableComparator();
    TreeManager treeManager = new BTreeManager(testNode, 2, 4, order, true);
    PropertySequence properties = ItemSequence.createPropertySequence(treeManager, errorHandler);
    Iterator<Property> propertyIt = properties.iterator();
    assertFalse(propertyIt.hasNext());
    assertEmpty(properties);
}
Also used : PropertySequence(org.apache.jackrabbit.commons.flat.PropertySequence) TreeManager(org.apache.jackrabbit.commons.flat.TreeManager) BTreeManager(org.apache.jackrabbit.commons.flat.BTreeManager) Property(javax.jcr.Property) BTreeManager(org.apache.jackrabbit.commons.flat.BTreeManager)

Example 7 with BTreeManager

use of org.apache.jackrabbit.commons.flat.BTreeManager in project jackrabbit by apache.

the class GroupImpl method getPropertySequence.

static PropertySequence getPropertySequence(Node nMembers, UserManagerImpl userManager) throws RepositoryException {
    Comparator<String> order = Rank.comparableComparator();
    int maxChildren = userManager.getMemberSplitSize();
    int minChildren = maxChildren / 2;
    TreeManager treeManager = new BTreeManager(nMembers, minChildren, maxChildren, order, userManager.isAutoSave());
    return ItemSequence.createPropertySequence(treeManager);
}
Also used : TreeManager(org.apache.jackrabbit.commons.flat.TreeManager) BTreeManager(org.apache.jackrabbit.commons.flat.BTreeManager) BTreeManager(org.apache.jackrabbit.commons.flat.BTreeManager)

Aggregations

BTreeManager (org.apache.jackrabbit.commons.flat.BTreeManager)7 TreeManager (org.apache.jackrabbit.commons.flat.TreeManager)7 NodeSequence (org.apache.jackrabbit.commons.flat.NodeSequence)3 PropertySequence (org.apache.jackrabbit.commons.flat.PropertySequence)3 Node (javax.jcr.Node)2 Property (javax.jcr.Property)2 ValueFactory (javax.jcr.ValueFactory)2