Skip to content

Commit

Permalink
[TH2-3827] overloaded method for manager initialization without event…
Browse files Browse the repository at this point in the history
…BatchDurationMillis parameter
  • Loading branch information
georgiano authored and georgiano committed Sep 21, 2022
1 parent a79b475 commit 5bd59c6
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions cradle-core/src/main/java/com/exactpro/cradle/CradleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,21 @@ public void init(String instanceName, boolean prepareStorage, long maxMessageBat
initStart(instanceName, prepareStorage, maxMessageBatchSize, maxTestEventBatchSize, eventBatchDurationMillis);
initFinish();
}


/**
* Initializes manager to get access to Cradle storage using given name of data instance
* @param instanceName name of data instance
* @param prepareStorage flag that indicates if underlying storage on disk can be created or its structure can be updated, if needed
* @param maxMessageBatchSize maximum size of {@link StoredMessageBatch} (in bytes) allowed for {@link CradleStorage} while writing data
* @param maxTestEventBatchSize maximum size of {@link StoredTestEventBatch} (in bytes) allowed for {@link CradleStorage} while writing data
* @throws CradleStorageException if access to Cradle storage cannot be established
*/
public void init(String instanceName, boolean prepareStorage, long maxMessageBatchSize, long maxTestEventBatchSize) throws CradleStorageException
{
initStart(instanceName, prepareStorage, maxMessageBatchSize, maxTestEventBatchSize, 0);
initFinish();
}

/**
* Initializes manager to get access to Cradle storage using given name of data instance
* @param instanceName name of data instance
Expand Down Expand Up @@ -106,7 +120,22 @@ public void initStart(String instanceName, boolean prepareStorage, long maxMessa
if (storage != null)
storage.init(instanceName, prepareStorage);
}


/**
* Starts initialization to get access to Cradle storage using given name of data instance
* @param instanceName name of data instance
* @param prepareStorage flag that indicates if underlying storage on disk can be created or its structure can be updated, if needed
* @param maxMessageBatchSize maximum size of {@link StoredMessageBatch} (in bytes) allowed for {@link CradleStorage} while writing data
* @param maxTestEventBatchSize maximum size of {@link StoredTestEventBatch} (in bytes) allowed for {@link CradleStorage} while writing data
* @throws CradleStorageException if access to Cradle storage cannot be established
*/
public void initStart(String instanceName, boolean prepareStorage, long maxMessageBatchSize, long maxTestEventBatchSize) throws CradleStorageException
{
storage = createStorage(maxMessageBatchSize, maxTestEventBatchSize, 0);
if (storage != null)
storage.init(instanceName, prepareStorage);
}

/**
* Starts initialization to get access to Cradle storage using given name of data instance
* @param instanceName name of data instance
Expand Down

0 comments on commit 5bd59c6

Please sign in to comment.