Skip to content

Commit

Permalink
Issue #2874, wal changes tree was integrated into tree bonsai and dur…
Browse files Browse the repository at this point in the history
…able page.
  • Loading branch information
laa committed Mar 4, 2015
1 parent af6a705 commit c1551db
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 128 deletions.
@@ -1,22 +1,22 @@
/*
*
* * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com)
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
* *
* * For more information: http://www.orientechnologies.com
*
*/
*
* * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com)
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
* *
* * For more information: http://www.orientechnologies.com
*
*/

package com.orientechnologies.orient.core.index.sbtreebonsai.local;

Expand All @@ -26,6 +26,7 @@
import com.orientechnologies.common.serialization.types.OLongSerializer;
import com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry;
import com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurablePage;
import com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OWALChangesTree;

/**
* A base class for bonsai buckets. Bonsai bucket size is usually less than page size and one page could contain multiple bonsai
Expand All @@ -39,8 +40,8 @@
* @author Artem Orobets (enisher-at-gmail.com)
*/
public class OBonsaiBucketAbstract extends ODurablePage {
public OBonsaiBucketAbstract(OCacheEntry cacheEntry, TrackMode trackMode) {
super(cacheEntry, trackMode);
public OBonsaiBucketAbstract(OCacheEntry cacheEntry, OWALChangesTree changesTree) {
super(cacheEntry, changesTree);
}

/**
Expand Down
@@ -1,22 +1,22 @@
/*
*
* * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com)
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
* *
* * For more information: http://www.orientechnologies.com
*
*/
*
* * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com)
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
* *
* * For more information: http://www.orientechnologies.com
*
*/

package com.orientechnologies.orient.core.index.sbtreebonsai.local;

Expand All @@ -34,6 +34,7 @@
import com.orientechnologies.orient.core.config.OGlobalConfiguration;
import com.orientechnologies.orient.core.index.hashindex.local.cache.OCacheEntry;
import com.orientechnologies.orient.core.index.sbtree.local.OSBTreeException;
import com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OWALChangesTree;

/**
* @author Andrey Lomakin
Expand Down Expand Up @@ -134,8 +135,8 @@ public int compareTo(SBTreeEntry<K, V> other) {
}

public OSBTreeBonsaiBucket(OCacheEntry cacheEntry, int pageOffset, boolean isLeaf, OBinarySerializer<K> keySerializer,
OBinarySerializer<V> valueSerializer, TrackMode trackMode) throws IOException {
super(cacheEntry, trackMode);
OBinarySerializer<V> valueSerializer, OWALChangesTree changesTree) throws IOException {
super(cacheEntry, changesTree);

this.offset = pageOffset;
this.isLeaf = isLeaf;
Expand All @@ -156,8 +157,8 @@ public OSBTreeBonsaiBucket(OCacheEntry cacheEntry, int pageOffset, boolean isLea
}

public OSBTreeBonsaiBucket(OCacheEntry cacheEntry, int pageOffset, OBinarySerializer<K> keySerializer,
OBinarySerializer<V> valueSerializer, TrackMode trackMode) {
super(cacheEntry, trackMode);
OBinarySerializer<V> valueSerializer, OWALChangesTree changesTree) {
super(cacheEntry, changesTree);

this.offset = pageOffset;
this.isLeaf = getByteValue(offset + IS_LEAF_OFFSET) > 0;
Expand Down

0 comments on commit c1551db

Please sign in to comment.