Skip to content

Commit

Permalink
Revert return type of Versioned.getVersion() to be Version rather tha…
Browse files Browse the repository at this point in the history
…n VectorClock
  • Loading branch information
jayjwylie committed Oct 31, 2012
1 parent 3c99c01 commit ba8c6fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion META-INF/MANIFEST.MF
Expand Up @@ -2,6 +2,6 @@ Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 20.2-b06 (Sun Microsystems Inc.)
Implementation-Title: Voldemort
Implementation-Version: 1.1.0
Implementation-Version: 1.1.1
Implementation-Vendor: LinkedIn

6 changes: 3 additions & 3 deletions src/java/voldemort/store/StoreBinaryFormat.java
Expand Up @@ -8,7 +8,7 @@
import voldemort.versioning.VectorClock;
import voldemort.versioning.Versioned;

/*
/*-
* Defines a generic on-disk binary data format for versioned voldemort data
* -----------------------------------------
* FORMAT_VERSION : 1 byte
Expand Down Expand Up @@ -38,15 +38,15 @@ public class StoreBinaryFormat {
public static byte[] toByteArray(List<Versioned<byte[]>> values) {
int size = 1;
for(Versioned<byte[]> v: values) {
size += v.getVersion().sizeInBytes();
size += ((VectorClock) v.getVersion()).sizeInBytes();
size += ByteUtils.SIZE_OF_INT;
size += v.getValue().length;
}
byte[] bytes = new byte[size];
int pos = 1;
bytes[0] = VERSION;
for(Versioned<byte[]> v: values) {
pos += v.getVersion().toBytes(bytes, pos);
pos += ((VectorClock) v.getVersion()).toBytes(bytes, pos);
int len = v.getValue().length;
ByteUtils.writeInt(bytes, len, pos);
pos += ByteUtils.SIZE_OF_INT;
Expand Down
3 changes: 2 additions & 1 deletion src/java/voldemort/versioning/Versioned.java
Expand Up @@ -44,7 +44,8 @@ public Versioned(T object, Version version) {
this.object = object;
}

public VectorClock getVersion() {
// public VectorClock getVersion() {
public Version getVersion() {
return version;
}

Expand Down

0 comments on commit ba8c6fb

Please sign in to comment.