对数据库物化和哈希表的疑问
我对物化技术和哈希表的概念有点困惑。 我正在开发一个项目,我被告知要实现一个哈希表,其中数据被“物化”(从具有不同结构的原始数据推断出来)并存储在中央内存中以供以后评估。必须这样做,因为评估函数执行得非常频繁,将部分信息保存在这个哈希表中肯定会提高整体性能。
现在,这个评估功能将用Java实现。我的问题是:我是否也可以在 Java 中创建这个哈希表,并将值列视为对象数组,而不是简单的 key:value 结构的经典概念?
I'm a little confused about the concepts of materialization techniques and hashtables.
I'm working on a project and I was told to implement a hashtable in which data is "materialized" (inferred from the origin data with a different structure) and stored in central memory for a later evaluation. This has to be done because the evaluation function is performed very often, and saving part of the information in this hashtable will definitely increase the overall performance.
Now, this evaluation function will be implemented in Java. My question is: can I create this hashtable in Java too and consider the value column as an array of objects, instead of the classic concept of simple key:value structure?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于java中的数组本身就是对象,因此您确实可以拥有一个对象数组。哈希表的通用绑定如下所示:
Since Arrays in java are objects in and of themselves, you can indeed have an array of objects. The generic binding for the Hashtable would look like this: