Class ResourceDatabaseClientMock
- java.lang.Object
-
- com.yahoo.vespa.hosted.controller.api.integration.resource.ResourceDatabaseClientMock
-
- All Implemented Interfaces:
ResourceDatabaseClient
public class ResourceDatabaseClientMock extends Object implements ResourceDatabaseClient
- Author:
- olaa
-
-
Constructor Summary
Constructors Constructor Description ResourceDatabaseClientMock(PlanRegistry planRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<YearMonth>getMonthsWithSnapshotsForTenant(com.yahoo.config.provision.TenantName tenantName)List<ResourceSnapshot>getRawSnapshotHistoryForTenant(com.yahoo.config.provision.TenantName tenantName, YearMonth yearMonth)List<ResourceSnapshot>getResourceSnapshotsForMonth(com.yahoo.config.provision.TenantName tenantName, com.yahoo.config.provision.ApplicationName applicationName, YearMonth month)List<ResourceUsage>getResourceSnapshotsForPeriod(com.yahoo.config.provision.TenantName tenantName, long start, long end)Set<com.yahoo.config.provision.TenantName>getTenants()booleanhasRefreshedMaterializedView()voidrefreshMaterializedView()voidsetPlan(com.yahoo.config.provision.TenantName tenant, Plan plan)voidwriteResourceSnapshots(Collection<ResourceSnapshot> items)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.yahoo.vespa.hosted.controller.api.integration.resource.ResourceDatabaseClient
getResourceSnapshotsForMonth
-
-
-
-
Constructor Detail
-
ResourceDatabaseClientMock
public ResourceDatabaseClientMock(PlanRegistry planRegistry)
-
-
Method Detail
-
writeResourceSnapshots
public void writeResourceSnapshots(Collection<ResourceSnapshot> items)
- Specified by:
writeResourceSnapshotsin interfaceResourceDatabaseClient
-
getResourceSnapshotsForMonth
public List<ResourceSnapshot> getResourceSnapshotsForMonth(com.yahoo.config.provision.TenantName tenantName, com.yahoo.config.provision.ApplicationName applicationName, YearMonth month)
- Specified by:
getResourceSnapshotsForMonthin interfaceResourceDatabaseClient
-
getMonthsWithSnapshotsForTenant
public Set<YearMonth> getMonthsWithSnapshotsForTenant(com.yahoo.config.provision.TenantName tenantName)
- Specified by:
getMonthsWithSnapshotsForTenantin interfaceResourceDatabaseClient
-
getRawSnapshotHistoryForTenant
public List<ResourceSnapshot> getRawSnapshotHistoryForTenant(com.yahoo.config.provision.TenantName tenantName, YearMonth yearMonth)
- Specified by:
getRawSnapshotHistoryForTenantin interfaceResourceDatabaseClient
-
getTenants
public Set<com.yahoo.config.provision.TenantName> getTenants()
- Specified by:
getTenantsin interfaceResourceDatabaseClient
-
getResourceSnapshotsForPeriod
public List<ResourceUsage> getResourceSnapshotsForPeriod(com.yahoo.config.provision.TenantName tenantName, long start, long end)
- Specified by:
getResourceSnapshotsForPeriodin interfaceResourceDatabaseClient
-
refreshMaterializedView
public void refreshMaterializedView()
- Specified by:
refreshMaterializedViewin interfaceResourceDatabaseClient
-
setPlan
public void setPlan(com.yahoo.config.provision.TenantName tenant, Plan plan)
-
hasRefreshedMaterializedView
public boolean hasRefreshedMaterializedView()
-
-