public void setSomePendingWritesAndSave ( final long atTime , final ChangeEvent < BsonDocument > changeEvent ) { docLock . writeLock ( ) . lock ( ) ; try { // if we were frozen if ( isPaused ) { // unfreeze the document due to the local write setPaused ( false ) ; // and now the unfrozen document is now stale setStale ( true ) ; } this . lastUncommittedChangeEvent = coalesceChangeEvents ( this . lastUncommittedChangeEvent , changeEvent ) ; this . lastResolution = atTime ; docsColl . replaceOne ( getDocFilter ( namespace , documentId ) , this ) ; } finally { docLock . writeLock ( ) . unlock ( ) ; } }
Sets that there are some pending writes that occurred at a time for an associated locally emitted change event . This variant maintains the last version set .