摘要:
mongo小结(>=2.2)
1、存储模式:面向集合存储,模式自由; GridFS大文件存储(16M)
2、容灾类型:主从复制(Replication)、Replica Set(自动选取主节点)、Sharding + Replica Set
3、支持CRUD 和 Fast In-Place Updates(文档内更新)
4、读写锁,写锁优先
5、存储机制:mmap file + 内存索引。完全由OS处理缓存。磁盘空间预分配(默认2G)。
6、集合类型:普通集合、TTL Collection(淘汰过期数据)、 Capped Collection(定长集合,FIFO)
7、同步:拷贝集合数据+日志同步
8、相对丰富的运维工具和shell客户端 阅读全文
随笔档案-2013年04月
Java容器小结和使用示例
2013-04-25 09:16 by zhenjing, 4747 阅读, 收藏, 编辑
摘要:
// Interfaces:
// Interface Iterator: hasNext(), next(), remove() ---- 所有容器通用的遍历方式。
// Interface Collection:add(E e),remove(Object o), clear(), isEmpty(), size(), iterator(), toArray() ---- 所有单值容器(map除外)的公共接口。
// Interface Map: put(K key, V value), get(Object key), remove(Object key), clear(),isEmpty(),size(), keySet(), entrySet(), values() ---- 所有K-V容器的公共接口,常见class: HashMap, Hashtable, IdentityHashMap, LinkedHashMap, ConcurrentHashMap
// Interface Map.Entry: getKey(), get 阅读全文