On 28/08/2014 09:02, Thomas Mueller wrote: > Hi, > > I think we need to decide whether "not beeing able to create checkpoint" > is an important and common case or not. > > * If it's an common case (if it uses tryAcquire which may or may not > work), then I would prefer "tryCheckpoint" with a possible return value of > null. > > * If it's not a common case, then throwing an exception would be fine. > > Or maybe we need both "tryCheckpoint" and "checkpoint"? > > But using "checkpoint" as the method name, and using a "special return > value" if it didn't work, that's dangerous, as it's so easy (specially for > new developers) to forget to check the return value. The Java API has some > similarly dangerous methods, for example InputStream.read(byte[] b...) > which may not read fully, that's an example on what to avoid I think. > +1 on everything for me. :)
D.
