/**
     * TODO: we will need to design the shared-memory region data structure, so that we can carry
     * the key/value type definition over from map shuffle store via the shuffle channel, plus this enum
     * category information for key.
     * @return
     */
@Override
    public ShuffleDataModel.KValueTypeId getKValueTypeId() {
       int val = ngetKValueTypeId(this.pointerToStore);
       if (val==ShuffleDataModel.KValueTypeId.Int.state){
           return ShuffleDataModel.KValueTypeId.Int;
       }
       else if (val == ShuffleDataModel.KValueTypeId.Long.state){
            return ShuffleDataModel.KValueTypeId.Long;
       }
       else if (val == ShuffleDataModel.KValueTypeId.Float.state){
           return ShuffleDataModel.KValueTypeId.Float;
       }
       else if (val == ShuffleDataModel.KValueTypeId.Double.state){
           return ShuffleDataModel.KValueTypeId.Double;
       }
       else if (val == ShuffleDataModel.KValueTypeId.String.state){
           return ShuffleDataModel.KValueTypeId.String;
       }
       else if (val == ShuffleDataModel.KValueTypeId.ByteArray.state){
           return ShuffleDataModel.KValueTypeId.ByteArray;
       }
       else if (val ==  ShuffleDataModel.KValueTypeId.Object.state){
           return ShuffleDataModel.KValueTypeId.Object;
       }
       else if (val == ShuffleDataModel.KValueTypeId.Unknown.state) {
           throw new RuntimeException("Unknown key value type encountered");
       }
       else {
    	   throw new RuntimeException("unsupported key value type encountered");
       }
    }
@Override
public ShuffleDataModel.KValueTypeId getKValueTypeId() {
int val = ngetKValueTypeId(this.pointerToStore);
if (val==ShuffleDataModel.KValueTypeId.Int.state){
return ShuffleDataModel.KValueTypeId.Int;
}
else if (val == ShuffleDataModel.KValueTypeId.Long.state){
return ShuffleDataModel.KValueTypeId.Long;
}
else if (val == ShuffleDataModel.KValueTypeId.Float.state){
return ShuffleDataModel.KValueTypeId.Float;
}
else if (val == ShuffleDataModel.KValueTypeId.Double.state){
return ShuffleDataModel.KValueTypeId.Double;
}
else if (val == ShuffleDataModel.KValueTypeId.String.state){
return ShuffleDataModel.KValueTypeId.String;
}
else if (val == ShuffleDataModel.KValueTypeId.ByteArray.state){
return ShuffleDataModel.KValueTypeId.ByteArray;
}
else if (val == ShuffleDataModel.KValueTypeId.Object.state){
return ShuffleDataModel.KValueTypeId.Object;
}
else if (val == ShuffleDataModel.KValueTypeId.Unknown.state) {
throw new RuntimeException("Unknown key value type encountered");
}
else {
throw new RuntimeException("unsupported key value type encountered");
}
}
@Override
public ShuffleDataModel.KValueTypeId getKValueTypeId() {
int val = ngetKValueTypeId(this.pointerToStore);
if (val==ShuffleDataModel.KValueTypeId.Int.state){
return ShuffleDataModel.KValueTypeId.Int;
}
else if (val == ShuffleDataModel.KValueTypeId.Long.state){
return ShuffleDataModel.KValueTypeId.Long;
}
else if (val == ShuffleDataModel.KValueTypeId.Float.state){
return ShuffleDataModel.KValueTypeId.Float;
}
else if (val == ShuffleDataModel.KValueTypeId.Double.state){
return ShuffleDataModel.KValueTypeId.Double;
}
else if (val == ShuffleDataModel.KValueTypeId.String.state){
return ShuffleDataModel.KValueTypeId.String;
}
else if (val == ShuffleDataModel.KValueTypeId.ByteArray.state){
return ShuffleDataModel.KValueTypeId.ByteArray;
}
else if (val == ShuffleDataModel.KValueTypeId.Object.state){
return ShuffleDataModel.KValueTypeId.Object;
}
else if (val == ShuffleDataModel.KValueTypeId.Unknown.state) {
throw new RuntimeException("Unknown key value type encountered");
}
else {
throw new RuntimeException("unsupported key value type encountered");
}
}
@Override
public ShuffleDataModel.KValueTypeId getKValueTypeId() {
int val = ngetKValueTypeId(this.pointerToStore);
if (val==ShuffleDataModel.KValueTypeId.Int.state){
return ShuffleDataModel.KValueTypeId.Int;
}
else if (val == ShuffleDataModel.KValueTypeId.Long.state){
return ShuffleDataModel.KValueTypeId.Long;
}
else if (val == ShuffleDataModel.KValueTypeId.Float.state){
return ShuffleDataModel.KValueTypeId.Float;
}
else if (val == ShuffleDataModel.KValueTypeId.Double.state){
return ShuffleDataModel.KValueTypeId.Double;
}
else if (val == ShuffleDataModel.KValueTypeId.String.state){
return ShuffleDataModel.KValueTypeId.String;
}
else if (val == ShuffleDataModel.KValueTypeId.ByteArray.state){
return ShuffleDataModel.KValueTypeId.ByteArray;
}
else if (val == ShuffleDataModel.KValueTypeId.Object.state){
return ShuffleDataModel.KValueTypeId.Object;
}
else if (val == ShuffleDataModel.KValueTypeId.Unknown.state) {
throw new RuntimeException("Unknown key value type encountered");
}
else {
throw new RuntimeException("unsupported key value type encountered");
}
}