-
Notifications
You must be signed in to change notification settings - Fork 871
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into laa_develop
# Conflicts: # core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OAbstractPaginatedStorage.java # core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/paginated/atomicoperations/OAtomicOperation.java
- Loading branch information
Showing
22 changed files
with
267 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../src/main/java/com/orientechnologies/orient/core/storage/impl/local/OTransactionData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.orientechnologies.orient.core.storage.impl.local; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class OTransactionData { | ||
private byte[] transactionId; | ||
private List<byte[]> records = new ArrayList<>(); | ||
|
||
public OTransactionData(byte[] transactionId) { | ||
this.transactionId = transactionId; | ||
} | ||
|
||
public void addRecord(byte[] record) { | ||
records.add(record); | ||
} | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
...ogies/orient/core/storage/impl/local/paginated/wal/OHighLevelTransactionChangeRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.orientechnologies.orient.core.storage.impl.local.paginated.wal; | ||
|
||
import com.orientechnologies.common.serialization.types.OIntegerSerializer; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
import static com.orientechnologies.orient.core.storage.impl.local.paginated.wal.WALRecordTypes.HIGH_LEVEL_TRANSACTION_CHANGE_RECORD; | ||
|
||
public class OHighLevelTransactionChangeRecord extends OOperationUnitRecord { | ||
private byte[] data; | ||
|
||
public OHighLevelTransactionChangeRecord() { | ||
|
||
} | ||
|
||
public OHighLevelTransactionChangeRecord(long operationUnitId, byte[] data) { | ||
super(operationUnitId); | ||
this.data = data; | ||
} | ||
|
||
@Override | ||
protected void serializeToByteBuffer(ByteBuffer buffer) { | ||
buffer.putInt(data.length); | ||
buffer.put(data, 0, data.length); | ||
} | ||
|
||
@Override | ||
protected void deserializeFromByteBuffer(ByteBuffer buffer) { | ||
int size = buffer.getInt(); | ||
data = new byte[size]; | ||
buffer.get(data, 0, size); | ||
} | ||
|
||
@Override | ||
public int serializedSize() { | ||
return super.serializedSize() + OIntegerSerializer.INT_SIZE + data.length; | ||
} | ||
|
||
@Override | ||
public boolean isUpdateMasterRecord() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return HIGH_LEVEL_TRANSACTION_CHANGE_RECORD; | ||
} | ||
|
||
public byte[] getData() { | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.