コード例 #1
0
 public BackgroundCompactionService(PersistentState state)
 {
     this.state = state;
     compaction = state is ILogCompactionSupport support ?
                  support.ForceCompactionAsync :
                  state.ForceIncrementalCompactionAsync;
 }
コード例 #2
0
 internal bool IsValid(PersistentState state)
 => ReferenceEquals(this.state, state) && state.lockVersion.VolatileRead() == version;
コード例 #3
0
 internal WriteLockToken(PersistentState state)
 {
     this.state = state;
     version    = state.lockVersion.VolatileRead();
 }
コード例 #4
0
 internal static ValueTask ForceIncrementalCompactionAsync(this PersistentState state, CancellationToken token)
 => state.CompactionCount > 0L ? state.ForceCompactionAsync(1L, token) : new ValueTask();