Java Mongo DB批量更新的乐观并发性

Java Mongo DB批量更新的乐观并发性,java,c#,mongodb,Java,C#,Mongodb,有人能给我推荐一个Java或C代码示例吗? 假设我有一个工作对象: class Job { public Guid _id { get; set; } public Guid _timestamp { get; set; } public string title { get; set; } } 我想实现使用乐观并发进行批量升级的存储库: interface IJobRepository { Job[] Write(Job[]: jobs) // ret

有人能给我推荐一个Java或C代码示例吗? 假设我有一个工作对象:

class Job
{
     public Guid _id { get; set; }
     public Guid _timestamp { get; set; }
     public string title { get; set; }
}
我想实现使用乐观并发进行批量升级的存储库:

interface IJobRepository {
    Job[] Write(Job[]: jobs)  // returns all it could write  
                              // having updated timestamps 
}