/// <summary> /// Constructs a storage engine to use /// </summary> /// <param name="endpointUrl">URL of the endpoint to access</param> /// <param name="fileCompositionHelperAddress">Endpoint to which higgs file parts can be retrieved</param> /// <param name="higgsFileRegistrationAddress">Endpoint to which newly created Higgs files can be registered</param> /// <param name="hash">Hashing algorithm to use (SHA256)</param> /// <param name="iocKernel">Inversion of control kernel to use</param> /// <param name="storageZoneId">Storage zone to target</param> /// <param name="pieceCache">Local piece cache to check against</param> public StorageEngine(string endpointUrl, string pieceCheckerUrl, string fileCompositionHelperAddress, string higgsFileRegistrationAddress, IHashTool hash, long storageZoneId, ILocalPieceCache pieceCache) { EndpointUrl = endpointUrl; _fileCompositionHelperAddress = fileCompositionHelperAddress; _higgsFileRegistrationAddress = higgsFileRegistrationAddress; _hash = hash; _storageZoneId = storageZoneId; _pieceCache = pieceCache; _pieceCheckerUrl = pieceCheckerUrl; }
public static StorageEngine Create(string storageEndpoint, string pieceCheckerEndpoint, string fileCompositionEndpoint, string fileRegistrationEndpoint, long storageZoneId, ILocalPieceCache pieceCache) { return new StorageEngine(storageEndpoint, pieceCheckerEndpoint, fileCompositionEndpoint, fileRegistrationEndpoint, new HashTool(), storageZoneId, pieceCache); }
public static StorageEngine Create(string storageEndpoint, string pieceCheckerEndpoint, string fileCompositionEndpoint, string fileRegistrationEndpoint, long storageZoneId, ILocalPieceCache pieceCache) { return(new StorageEngine(storageEndpoint, pieceCheckerEndpoint, fileCompositionEndpoint, fileRegistrationEndpoint, new HashTool(), storageZoneId, pieceCache)); }