Reputation: 55
I'm migrating our database from MongoDB to Aerospike, so I'm expecting the Bin type in Aerospike's Java client to implement java.util.Map<String, Object>
, but discovered that the Bin is defined as:
public final class Bin {
yet from what I understand, the Bin is like a map (name->value).
So why is that?
Upvotes: 2
Views: 94
Reputation: 3567
This is a flexible design and future proof. As of today it has only name and value. So, map is enough. In the future, if you want to set/get additional properties like bin-level ttl, or persistence etc, this design will allow that.
Upvotes: 3