Ejemplo n.º 1
0
 public static PutBlobResult NewRedisEntry(ShortHash hash, long blobSize, string redisKey, long newCapacity)
 {
     return(new PutBlobResult(hash, blobSize, newRedisCapacity: newCapacity, alreadyInRedis: false, redisKey: redisKey));
 }
 public Task <PutBlobResult> PutBlobAsync(OperationContext context, ShortHash hash, byte[] blob)
 {
     throw new NotImplementedException();
 }
 public Task <GetBlobResult> GetBlobAsync(OperationContext context, ShortHash hash)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 4
0
 public static PutBlobResult RedisHasAlready(ShortHash hash, long blobSize, string redisKey) => new PutBlobResult(hash, blobSize, redisKey: redisKey, alreadyInRedis: true);
Ejemplo n.º 5
0
 /// <nodoc />
 public ShortHashWithSize(ShortHash contentHash, long size)
 {
     Hash = contentHash;
     Size = size;
 }
Ejemplo n.º 6
0
 public static PutBlobResult Throttled(ShortHash hash, long blobSize, string redisKey, string extraMsg)
 {
     Contract.RequiresNotNullOrEmpty(extraMsg);
     return(new PutBlobResult(hash, blobSize, redisKey: redisKey, skipReason: SkipReason.Throttled, extraMsg: extraMsg));
 }
Ejemplo n.º 7
0
 public static PutBlobResult OutOfCapacity(ShortHash hash, long blobSize, string redisKey, string?extraMsg = null)
 {
     return(new PutBlobResult(hash, blobSize, redisKey: redisKey, skipReason: SkipReason.OutOfCapacity, extraMsg: extraMsg));
 }
Ejemplo n.º 8
0
 public PutBlobResult(ResultBase other, ShortHash hash, long blobSize)
     : base(other)
 {
     _hash     = hash;
     _blobSize = blobSize;
 }
Ejemplo n.º 9
0
 public PutBlobResult(ResultBase other, string message, ShortHash hash, long blobSize)
     : base(other, message)
 {
     _hash     = hash;
     _blobSize = blobSize;
 }
Ejemplo n.º 10
0
 public PutBlobResult(ShortHash hash, long blobSize, string errorMessage)
     : base(errorMessage)
 {
     _hash     = hash;
     _blobSize = blobSize;
 }