Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TrimBulkRemoteCall"/> class.
 /// </summary>
 private TrimBulkRemoteCall(
     RedisContentLocationStoreTracer tracer,
     OperationContext context,
     IReadOnlyList <ContentHashAndLocations> contentHashesWithLocations)
     : base(tracer, context, contentHashesWithLocations)
 {
     Tracer.TrimBulkRemoteStart();
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetBulkCall"/> class.
 /// </summary>
 private GetBulkCall(
     RedisContentLocationStoreTracer tracer,
     OperationContext context,
     IReadOnlyList <ContentHash> contentHashes)
     : base(tracer, context, contentHashes)
 {
     Tracer.GetBulkStart();
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TrimOrGetLastAccessTimeCall"/> class.
 /// </summary>
 private TrimOrGetLastAccessTimeCall(
     RedisContentLocationStoreTracer tracer,
     OperationContext context,
     IList <Tuple <ContentHashWithLastAccessTimeAndReplicaCount, bool> > contentHashesWithInfo,
     MachineId?machineId)
     : base(tracer, context, contentHashesWithInfo)
 {
     Tracer.TrimOrGetLastAccessTimeStart(context, contentHashesWithInfo, machineId);
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UpdateBulkCall"/> class.
 /// </summary>
 private UpdateBulkCall(
     RedisContentLocationStoreTracer tracer,
     OperationContext context,
     IReadOnlyList <ContentHashWithSizeAndLocations> contentHashesWithSizeAndLocations,
     MachineId?machineId)
     : base(tracer, context, ValueTuple.Create(contentHashesWithSizeAndLocations, machineId))
 {
     Tracer.UpdateBulkStart();
 }
Пример #5
0
 /// <summary>
 ///     Run the call.
 /// </summary>
 public static async Task <BoolResult> RunAsync(
     RedisContentLocationStoreTracer tracer,
     OperationContext context,
     IReadOnlyList <ContentHashAndLocations> contentHashesWithLocations,
     Func <Task <BoolResult> > funcAsync)
 {
     using (var call = new TrimBulkRemoteCall(tracer, context, contentHashesWithLocations))
     {
         return(await call.RunAsync(funcAsync));
     }
 }
Пример #6
0
 /// <summary>
 ///     Run the call.
 /// </summary>
 public static async Task <GetBulkLocationsResult> RunAsync(
     RedisContentLocationStoreTracer tracer,
     OperationContext context,
     IReadOnlyList <ContentHash> contentHashes,
     Func <Task <GetBulkLocationsResult> > funcAsync)
 {
     using (var call = new GetBulkCall(tracer, context, contentHashes))
     {
         return(await call.RunAsync(funcAsync));
     }
 }
Пример #7
0
 /// <summary>
 ///     Run the call.
 /// </summary>
 public static async Task <ObjectResult <IList <ContentHashWithLastAccessTimeAndReplicaCount> > > RunAsync(
     RedisContentLocationStoreTracer tracer,
     OperationContext context,
     IList <Tuple <ContentHashWithLastAccessTimeAndReplicaCount, bool> > contentHashesWithInfo,
     MachineId?machineId,
     Func <Task <ObjectResult <IList <ContentHashWithLastAccessTimeAndReplicaCount> > > > funcAsync)
 {
     using (var call = new TrimOrGetLastAccessTimeCall(tracer, context, contentHashesWithInfo, machineId))
     {
         return(await call.RunAsync(funcAsync));
     }
 }
Пример #8
0
 /// <summary>
 ///     Run the call.
 /// </summary>
 public static async Task <BoolResult> RunAsync(
     RedisContentLocationStoreTracer tracer,
     OperationContext context,
     IReadOnlyList <ContentHashWithSizeAndLocations> contentHashesWithSizeAndLocations,
     MachineId?machineId,
     Func <Task <BoolResult> > funcAsync)
 {
     using (var call = new UpdateBulkCall(tracer, context, contentHashesWithSizeAndLocations, machineId))
     {
         return(await call.RunAsync(funcAsync));
     }
 }