Skip to content

Commit

Permalink
Renamed o.n.i.gbptree -> o.n.i.internal.gbptree
Browse files Browse the repository at this point in the history
  • Loading branch information
tinwelint committed Jan 12, 2017
1 parent f3b1a99 commit 3bb1777
Show file tree
Hide file tree
Showing 55 changed files with 218 additions and 130 deletions.
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -31,8 +31,8 @@
import static java.lang.Math.toIntExact;
import static java.lang.String.format;

import static org.neo4j.index.gbptree.GenSafePointerPair.pointer;
import static org.neo4j.index.gbptree.PageCursorUtil.checkOutOfBounds;
import static org.neo4j.index.internal.gbptree.GenSafePointerPair.pointer;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.checkOutOfBounds;

/**
* <ul>
Expand Down
Expand Up @@ -17,16 +17,16 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.IOException;
import java.util.function.LongConsumer;

import org.neo4j.io.pagecache.PageCursor;
import org.neo4j.io.pagecache.PagedFile;

import static org.neo4j.index.gbptree.PageCursorUtil.checkOutOfBounds;
import static org.neo4j.index.gbptree.PageCursorUtil.goTo;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.checkOutOfBounds;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.goTo;

class FreeListIdProvider implements IdProvider
{
Expand Down
Expand Up @@ -17,13 +17,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import org.neo4j.io.pagecache.PageCursor;

import static org.neo4j.index.gbptree.PageCursorUtil.get6BLong;
import static org.neo4j.index.gbptree.PageCursorUtil.getUnsignedInt;
import static org.neo4j.index.gbptree.PageCursorUtil.put6BLong;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.get6BLong;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.getUnsignedInt;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.put6BLong;

/**
* Manages the physical format of a free-list node, i.e. how bytes about free-list pages
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import org.apache.commons.lang3.tuple.Pair;

Expand All @@ -42,10 +42,11 @@
import org.neo4j.io.pagecache.PagedFile;

import static java.lang.String.format;
import static org.neo4j.index.gbptree.Generation.generation;
import static org.neo4j.index.gbptree.Generation.stableGeneration;
import static org.neo4j.index.gbptree.Generation.unstableGeneration;
import static org.neo4j.index.gbptree.PageCursorUtil.checkOutOfBounds;

import static org.neo4j.index.internal.gbptree.Generation.generation;
import static org.neo4j.index.internal.gbptree.Generation.stableGeneration;
import static org.neo4j.index.internal.gbptree.Generation.unstableGeneration;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.checkOutOfBounds;

/**
* A generation-aware B+tree (GB+Tree) implementation directly atop a {@link PageCache} with no caching in between.
Expand Down
Expand Up @@ -17,13 +17,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import org.neo4j.io.pagecache.PageCursor;

import static org.neo4j.index.gbptree.PageCursorUtil.get6BLong;
import static org.neo4j.index.gbptree.PageCursorUtil.getUnsignedInt;
import static org.neo4j.index.gbptree.PageCursorUtil.put6BLong;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.get6BLong;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.getUnsignedInt;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.put6BLong;

/**
* Provides static methods for getting and manipulating GSP (gen-safe pointer) data.
Expand Down
Expand Up @@ -17,17 +17,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import org.neo4j.io.pagecache.PageCursor;

import static java.lang.String.format;

import static org.neo4j.index.gbptree.GenSafePointer.MIN_GENERATION;
import static org.neo4j.index.gbptree.GenSafePointer.checksumOf;
import static org.neo4j.index.gbptree.GenSafePointer.readChecksum;
import static org.neo4j.index.gbptree.GenSafePointer.readGeneration;
import static org.neo4j.index.gbptree.GenSafePointer.readPointer;
import static org.neo4j.index.internal.gbptree.GenSafePointer.MIN_GENERATION;
import static org.neo4j.index.internal.gbptree.GenSafePointer.checksumOf;
import static org.neo4j.index.internal.gbptree.GenSafePointer.readChecksum;
import static org.neo4j.index.internal.gbptree.GenSafePointer.readGeneration;
import static org.neo4j.index.internal.gbptree.GenSafePointer.readPointer;

/**
* Two {@link GenSafePointer} forming the basis for a B+tree becoming generate-aware.
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

/**
* Logic for composing and decomposing stable/unstable generation number (unsigned int) to/from a single {@code long}.
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

/**
* Represents a hit during an {@link Index#seek(Object, Object)}. There's no guarantee about whether or
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.IOException;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

/**
* Defines special page ids for {@link GBPTree}.
Expand Down
Expand Up @@ -17,17 +17,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;

import org.neo4j.io.pagecache.PageCursor;

import static org.neo4j.index.gbptree.KeySearch.isHit;
import static org.neo4j.index.gbptree.KeySearch.positionOf;
import static org.neo4j.index.gbptree.PageCursorUtil.goTo;
import static org.neo4j.index.internal.gbptree.KeySearch.isHit;
import static org.neo4j.index.internal.gbptree.KeySearch.positionOf;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.goTo;

/**
* Implementation of GB+ tree insert/remove algorithms.
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.util.Comparator;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.util.Comparator;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

/**
* Thrown to signal mismatches between meta data about tree and user-provided configuration.
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.IOException;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import org.neo4j.io.pagecache.PageCursor;

Expand Down
Expand Up @@ -17,11 +17,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import org.neo4j.io.pagecache.PageCursor;

import static org.neo4j.index.gbptree.TreeNode.NO_NODE_FLAG;
import static org.neo4j.index.internal.gbptree.TreeNode.NO_NODE_FLAG;

/**
* Used to verify a chain of siblings starting with leftmost node.
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.IOException;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.IOException;
import java.util.function.LongSupplier;
Expand All @@ -27,7 +27,8 @@
import org.neo4j.io.pagecache.PageCursor;

import static java.lang.Integer.max;
import static org.neo4j.index.gbptree.PageCursorUtil.checkOutOfBounds;

import static org.neo4j.index.internal.gbptree.PageCursorUtil.checkOutOfBounds;

/**
* {@link RawCursor} over tree leaves, making keys/values accessible to user. Given a starting leaf
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

/**
* Means of communicating information about splits, caused by insertion, from lower levels of the tree up to parent
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

/**
* Thrown to signal inconsistencies in the tree, either between tree nodes or inside a tree node.
Expand Down
Expand Up @@ -17,16 +17,16 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.IOException;
import java.util.Comparator;
import java.util.function.Consumer;

import org.neo4j.io.pagecache.PageCursor;

import static org.neo4j.index.gbptree.GenSafePointerPair.NO_LOGICAL_POS;
import static org.neo4j.index.gbptree.GenSafePointerPair.read;
import static org.neo4j.index.internal.gbptree.GenSafePointerPair.NO_LOGICAL_POS;
import static org.neo4j.index.internal.gbptree.GenSafePointerPair.read;

/**
* Methods to manipulate single tree node such as set and get header fields,
Expand Down
Expand Up @@ -17,14 +17,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.IOException;
import java.io.PrintStream;
import org.neo4j.io.pagecache.PageCursor;

import static org.neo4j.index.gbptree.ConsistencyChecker.assertOnTreeNode;
import static org.neo4j.index.gbptree.GenSafePointerPair.pointer;
import static org.neo4j.index.internal.gbptree.ConsistencyChecker.assertOnTreeNode;
import static org.neo4j.index.internal.gbptree.GenSafePointerPair.pointer;

/**
* Utility class for printing a {@link GBPTree}, either whole or sub-tree.
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.util.Objects;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import org.apache.commons.lang3.tuple.Pair;

Expand All @@ -26,7 +26,7 @@

import org.neo4j.io.pagecache.PageCursor;

import static org.neo4j.index.gbptree.PageCursorUtil.checkOutOfBounds;
import static org.neo4j.index.internal.gbptree.PageCursorUtil.checkOutOfBounds;

/**
* Pair of {@link TreeState}, ability to make decision about which of the two to read and write respectively,
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

/**
* Decides what to do when inserting key which already exists in index. Different implementations of
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

/**
* Common {@link ValueMerger} implementations.
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.Closeable;
import java.io.IOException;
Expand Down
Expand Up @@ -27,4 +27,4 @@
* <p>
* See https://en.wikipedia.org/wiki/B%2B_tree
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.gbptree;
package org.neo4j.index.internal.gbptree;

import java.io.File;
import java.io.IOException;
Expand Down

0 comments on commit 3bb1777

Please sign in to comment.