@Test public void purgeExpiredDipFilesTest() throws ContentAddressableStorageServerException { WorkspaceClient workspaceClient = mock(WorkspaceClient.class); WorkspaceClientFactory workspaceClientFactory = mock(WorkspaceClientFactory.class); doReturn(workspaceClient).when(workspaceClientFactory).getClient(); ExportsPurgeService exportsPurgeService = new ExportsPurgeService(workspaceClientFactory, null, 10); exportsPurgeService.purgeExpiredFiles(DIP_CONTAINER); verify(workspaceClient).purgeOldFilesInContainer(DIP_CONTAINER, new TimeToLive(10, ChronoUnit.MINUTES)); }
public void purgeExpiredFiles(String container) throws ContentAddressableStorageServerException { try (WorkspaceClient workspaceClient = this.workspaceClientFactory.getClient()) { workspaceClient.purgeOldFilesInContainer( container, new TimeToLive(this.timeToLiveInMinutes, ChronoUnit.MINUTES)); } }
ExportsPurgeService { public void purgeExpiredFiles(String container) throws ContentAddressableStorageServerException { try (WorkspaceClient workspaceClient = this.workspaceClientFactory.getClient()) { workspaceClient.purgeOldFilesInContainer( container, new TimeToLive(this.timeToLiveInMinutes, ChronoUnit.MINUTES)); } } }
ExportsPurgeService { public void purgeExpiredFiles(String container) throws ContentAddressableStorageServerException { try (WorkspaceClient workspaceClient = this.workspaceClientFactory.getClient()) { workspaceClient.purgeOldFilesInContainer( container, new TimeToLive(this.timeToLiveInMinutes, ChronoUnit.MINUTES)); } } ExportsPurgeService(int timeToLiveInMinutes); @VisibleForTesting  ExportsPurgeService(WorkspaceClientFactory workspaceClientFactory,
        StorageClientFactory storageClientFactory, int timeToLiveInMinutes); }
ExportsPurgeService { public void purgeExpiredFiles(String container) throws ContentAddressableStorageServerException { try (WorkspaceClient workspaceClient = this.workspaceClientFactory.getClient()) { workspaceClient.purgeOldFilesInContainer( container, new TimeToLive(this.timeToLiveInMinutes, ChronoUnit.MINUTES)); } } ExportsPurgeService(int timeToLiveInMinutes); @VisibleForTesting  ExportsPurgeService(WorkspaceClientFactory workspaceClientFactory,
        StorageClientFactory storageClientFactory, int timeToLiveInMinutes); void purgeExpiredFiles(String container); void migrationPurgeDipFilesFromOffers(); }
ExportsPurgeService { public void purgeExpiredFiles(String container) throws ContentAddressableStorageServerException { try (WorkspaceClient workspaceClient = this.workspaceClientFactory.getClient()) { workspaceClient.purgeOldFilesInContainer( container, new TimeToLive(this.timeToLiveInMinutes, ChronoUnit.MINUTES)); } } ExportsPurgeService(int timeToLiveInMinutes); @VisibleForTesting  ExportsPurgeService(WorkspaceClientFactory workspaceClientFactory,
        StorageClientFactory storageClientFactory, int timeToLiveInMinutes); void purgeExpiredFiles(String container); void migrationPurgeDipFilesFromOffers();  }