Redian新闻
>
Unmodifiable List concurrent access 问题
avatar
Unmodifiable List concurrent access 问题# Java - 爪哇娇娃
H*s
1
双龙戏珠,在明代带板里面算题材少见的。
avatar
l*s
2
比如说,股票的历史记录是子表,把所有的股票汇总起来就是一个总表,怎么通过总表
访问部分子表的数据?还是干脆开目录写文件算了?
avatar
c*e
3
One class has a List, and exposes it as an unmodifiable list:
public List getItems() {
syncrhonized (this.items) {
return Collections.unmodifiableList(this.items):
}
}
this.items may be accessed by multiple threads. It is possible new item may
be added or removed while the caller is reading through the list obtained
from getItems(). But what the caller needs is just a best-effort snapshot
of the items, and missing a few new items is ok for the caller. Does the
above method work? In other words, can the caller safely navigate through
the snapshot data without any data corruption?
Maybe a fully thread-safe approach is just to return a new list:
public List getItems() {
synchronized(this.items) {
return new ArrayList(this.items);
}
}
是不是太浪费了?
碰到这种问题,大家都是怎样处理的? 谢谢。
avatar
eu
4
带板是什么? 摆饰 还是 带在身上的

【在 H***s 的大作中提到】
: 双龙戏珠,在明代带板里面算题材少见的。
avatar
z*3
5
data warehousing or data integration? some bi tools ssis
avatar
f*n
6
No, it is not safe.
avatar
b*e
7
怎么才能开出是明代的?看雕工?
avatar
l*s
8
Not sure about the difference, but it seems that what I need is warehousing.
Putting 8k files in one directory is pretty ugly. : -(
data warehousing.

【在 z*3 的大作中提到】
: data warehousing or data integration? some bi tools ssis
avatar
z*e
9
copyonwritearraylist
avatar
H*s
10
缝在腰带上的,一套大概12-14块左右

【在 eu 的大作中提到】
: 带板是什么? 摆饰 还是 带在身上的
avatar
j*n
11
You'd understand what is Normalization first.
avatar
t*e
12
那个synchronized一点用都没有。还是web programming好啊,concurrency都扔给数据
库处理了。
avatar
H*s
13
看器形,纹饰特点和工艺风格

【在 b*****e 的大作中提到】
: 怎么才能开出是明代的?看雕工?
avatar
B*g
14
bu ming bai

【在 l*********s 的大作中提到】
: 比如说,股票的历史记录是子表,把所有的股票汇总起来就是一个总表,怎么通过总表
: 访问部分子表的数据?还是干脆开目录写文件算了?

avatar
c*s
15
质地看起来很漂亮,是何种玉?

【在 H***s 的大作中提到】
: 双龙戏珠,在明代带板里面算题材少见的。
avatar
z*3
16
老大,你的意思是不是就是drill down,比如上一个level的时候就是select sum(
price) from stock cube by pub_date,下一个level就是select sum(price) cube by
location,pub_date?如果这样的话,你就建个cube吧。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。