public class CachingProctorStore extends Object implements ProctorStore
| Constructor and Description |
|---|
CachingProctorStore(ProctorStore delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTestDefinition(String username,
String password,
String author,
String testName,
TestDefinition testDefinition,
Map<String,String> metadata,
String comment) |
void |
addTestDefinition(String username,
String password,
String testName,
TestDefinition testDefinition,
Map<String,String> metadata,
String comment) |
boolean |
cleanUserWorkspace(String username) |
void |
close() |
void |
deleteTestDefinition(String username,
String password,
String author,
String previousVersion,
String testName,
TestDefinition testDefinition,
String comment) |
void |
deleteTestDefinition(String username,
String password,
String previousVersion,
String testName,
TestDefinition testDefinition,
String comment) |
Map<String,List<Revision>> |
getAllHistories()
Returns a list of revisions grouped by a test.
|
TestDefinition |
getCurrentTestDefinition(String test)
Returns a current test definition of a test in the database.
|
TestMatrixVersion |
getCurrentTestMatrix()
Returns the current test matrix in the database.
|
List<Revision> |
getHistory(String test,
int start,
int limit)
Returns a list of revisions for a test ordered by recency.
|
List<Revision> |
getHistory(String test,
String revision,
int start,
int limit)
Returns a list of revisions for a test when test revision was made ordered by recency.
|
String |
getLatestVersion()
Returns the latest revision id.
|
List<Revision> |
getMatrixHistory(int start,
int limit)
caching is not supported for this method
|
String |
getName()
This method returns a name of the ProctorStore instance for logging purpose.
|
RevisionDetails |
getRevisionDetails(String revisionId)
Returns a details of a single revision.
|
TestDefinition |
getTestDefinition(String test,
String fetchRevision)
Returns a test definition of a test when the revision was made.
|
TestMatrixVersion |
getTestMatrix(String fetchRevision)
Returns a test matrix when the revision was made.
|
void |
refresh()
Update the local state with the remote database.
|
static <T> List<T> |
selectHistorySet(List<T> histories,
int start,
int limit)
Deprecated.
|
static List<Revision> |
selectRevisionHistorySetFrom(List<Revision> history,
String from,
int start,
int limit)
Deprecated.
|
void |
updateTestDefinition(String username,
String password,
String author,
String previousVersion,
String testName,
TestDefinition testDefinition,
Map<String,String> metadata,
String comment) |
void |
updateTestDefinition(String username,
String password,
String previousVersion,
String testName,
TestDefinition testDefinition,
Map<String,String> metadata,
String comment)
Following three methods make side-effect and it would trigger cache refreshing at once
|
void |
verifySetup()
Verifies the data store object is ready to operate.
|
public CachingProctorStore(ProctorStore delegate)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic TestMatrixVersion getCurrentTestMatrix() throws StoreException
ProctorReadergetCurrentTestMatrix in interface ProctorReaderStoreExceptionpublic TestDefinition getCurrentTestDefinition(String test) throws StoreException
ProctorReadergetCurrentTestDefinition in interface ProctorReadertest - name of the testStoreExceptionpublic void verifySetup()
throws StoreException
ProctorReaderverifySetup in interface ProctorReaderverifySetup in interface ProctorWriterStoreException - if it's not ready to operate.@Nonnull public String getLatestVersion() throws StoreException
ProctorReadergetLatestVersion in interface ProctorReaderStoreExceptionpublic TestMatrixVersion getTestMatrix(String fetchRevision) throws StoreException
ProctorReadergetTestMatrix in interface ProctorReaderfetchRevision - id of the revisionStoreExceptionpublic TestDefinition getTestDefinition(String test, String fetchRevision) throws StoreException
ProctorReadergetTestDefinition in interface ProctorReadertest - name of the testfetchRevision - id of the revisionStoreException@Nonnull public List<Revision> getMatrixHistory(int start, int limit) throws StoreException
getMatrixHistory in interface ProctorReaderstart - offset of the first revision (0-indexed)limit - limit of the number of revisionsStoreException@Nonnull public List<Revision> getHistory(String test, int start, int limit) throws StoreException
ProctorReadergetHistory in interface ProctorReadertest - name of the teststart - offset of the first revision (0-indexed)limit - limit of the number of revisionsStoreException@Nonnull public List<Revision> getHistory(String test, String revision, int start, int limit) throws StoreException
ProctorReadergetHistory in interface ProctorReadertest - name of the teststart - offset of the first revision (0-indexed)limit - limit of the number of revisionsStoreException@CheckForNull public RevisionDetails getRevisionDetails(String revisionId) throws StoreException
ProctorReadergetRevisionDetails in interface ProctorReaderrevisionId - id of the revisionStoreException@Nonnull public Map<String,List<Revision>> getAllHistories() throws StoreException
ProctorReadergetAllHistories in interface ProctorReaderStoreExceptionpublic void refresh()
throws StoreException
ProctorReaderrefresh in interface ProctorReaderStoreException@Deprecated public static <T> List<T> selectHistorySet(List<T> histories, int start, int limit)
HistoryUtil.selectHistorySet(List, int, int)@Deprecated public static List<Revision> selectRevisionHistorySetFrom(List<Revision> history, String from, int start, int limit)
public boolean cleanUserWorkspace(String username)
cleanUserWorkspace in interface ProctorWriterpublic void updateTestDefinition(String username, String password, String previousVersion, String testName, TestDefinition testDefinition, Map<String,String> metadata, String comment) throws StoreException.TestUpdateException
updateTestDefinition in interface ProctorWriterStoreException.TestUpdateExceptionpublic void updateTestDefinition(String username, String password, String author, String previousVersion, String testName, TestDefinition testDefinition, Map<String,String> metadata, String comment) throws StoreException.TestUpdateException
updateTestDefinition in interface ProctorWriterStoreException.TestUpdateExceptionpublic void deleteTestDefinition(String username, String password, String previousVersion, String testName, TestDefinition testDefinition, String comment) throws StoreException.TestUpdateException
deleteTestDefinition in interface ProctorWriterStoreException.TestUpdateExceptionpublic void deleteTestDefinition(String username, String password, String author, String previousVersion, String testName, TestDefinition testDefinition, String comment) throws StoreException.TestUpdateException
deleteTestDefinition in interface ProctorWriterStoreException.TestUpdateExceptionpublic void addTestDefinition(String username, String password, String testName, TestDefinition testDefinition, Map<String,String> metadata, String comment) throws StoreException.TestUpdateException
addTestDefinition in interface ProctorWriterStoreException.TestUpdateExceptionpublic void addTestDefinition(String username, String password, String author, String testName, TestDefinition testDefinition, Map<String,String> metadata, String comment) throws StoreException.TestUpdateException
addTestDefinition in interface ProctorWriterStoreException.TestUpdateExceptionpublic String getName()
ProctorStoregetName in interface ProctorStoreCopyright © 2019. All rights reserved.