On 25/08/2014 08:35, Michael Dürig wrote:
>
>
> On 22.8.14 4:31 , Alex Parvulescu wrote:
>> Hi,
>>
>> Following OAK-2039 there was a discussion around the current design
>> of the
>> #checkpoint apis. [0]
>>
>> It looks a bit confusing that you can call the apis to create a
>> checkpoint
>> and get back a reference but when retrieving it, it might not exist,
>> even
>> if the calls are back to back.
>
> Reading the Javadoc carefully this is to be expected. However I think
> this could be improved. Either by making the Javadoc for #checkpoint
> more explicit about it or by reflecting it in the return value.
>
> Instead of returning null for the later option we could also return a
> constant value representing a not available checkpoint. With that
> client code wouldn't need to change but could check the returned value
> if desired.
>
Don't know if I'm understanding you correctly but I think that either we
return null or a proper object with error codes/messages. Returning an
error as String and having the client coding something like `if
(NodeStore.CHECKPOINT_ERROR.equals(checkpoint))` doesn't add any real
value versus `if (checkpoint == null)`.

Davide


Reply via email to