On Fri, May 30, 2008 at 5:00 PM, Kiran Ayyagari <[EMAIL PROTECTED]> wrote:
> hi All, > > Below is the summary which lead to the modification of put() and > remove()/delete() method signatures in > Table and MasterTable. > > Changed Interfaces :- The put() and remove() methods in Table and put() and > delete() methods in MasterTable. > > The context :- Implementation of a Berkeley DB JE based partition for ADS. > > Reason for the change :- In the Jdbm based Table implementation put() and > remove() operations return a value > cause JDBM returns the > existing/previous values (like a HashMap) for put and remove > and these values are returned from > the above mentioned operations. > > But JE doesn't return these > (existing/previous) values instead returns a special Enum > value stating the success or > failure of the operation. > > However I have observed that the return values of the existing put() and > remove() methods are not used anywhere hence I made the above said change ( > tested this by changing the interfaces and the respective implementations > and ran all tests ( Note: no functional aspects of the implementations was > touched except removing or replacing the *return* statements) ) > > thoughts? > This sounds good - we certainly don't want to bother with the overhead of an additional lookup. > P.S :- In the JE based implementation we can still return the > previous/existing value but this requires a > lookup in each operation (put and remove) for storing the old value > but this is not a desirable implementation. > Thanks, Alex
