java - BDB LongBinding vs ByteArrayBinding static methods -
in longbinding
class, methods entrytolong(databaseentry entry)
, longtoentry(long val, databaseentry entry)
both static.
but in bytearraybinding
class, entrytoobject(databaseentry entry)
, objecttoentry(byte[] object, databaseentry entry)
both not static.
the implementations of these methods seem similar. example, upon examining source code, 1 can see both longtoentry
, objecttoentry
methods delegating entry.setdata
, entry
method parameter type databaseentry
.
why these 2 longbinding
methods static, while analogous bytearraybinding
methods not?
in pom.xml, have following dependency:
<dependency> <groupid>com.sleepycat</groupid> <artifactid>je</artifactid> <version>4.1.21</version> </dependency>
there not explanation.
the methods in bytearraybinding
(and should?) have been static
have no reference instance of class.
those 2 classes have been written different developpers , implemented functionality bit differently.
Comments
Post a Comment