-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CIRC-2167 Search slips: address high memory consumption [Q] (#1533)
* CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls * CIRC-2167 Address high memory consumption in mod-circulation for Quesnelia triggered by search-slips endpoint calls (cherry picked from commit e227033)
1 parent
4858ade
commit 66e1ae7
Showing
10 changed files
with
139 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/org/folio/circulation/domain/configuration/PrintHoldRequestsConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.folio.circulation.domain.configuration; | ||
|
||
import io.vertx.core.json.JsonObject; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
import static org.folio.circulation.support.json.JsonPropertyFetcher.getBooleanProperty; | ||
|
||
@AllArgsConstructor | ||
@Getter | ||
@ToString(onlyExplicitlyIncluded = true) | ||
public class PrintHoldRequestsConfiguration { | ||
|
||
@ToString.Include | ||
private final boolean printHoldRequestsEnabled; | ||
|
||
public static PrintHoldRequestsConfiguration from(JsonObject jsonObject) { | ||
return new PrintHoldRequestsConfiguration(getBooleanProperty(jsonObject, | ||
"printHoldRequestsEnabled")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/java/api/support/builders/PrintHoldRequestConfigurationBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package api.support.builders; | ||
|
||
import io.vertx.core.json.JsonObject; | ||
import lombok.AllArgsConstructor; | ||
import lombok.NoArgsConstructor; | ||
import lombok.With; | ||
|
||
@With | ||
@AllArgsConstructor | ||
@NoArgsConstructor(force = true) | ||
public class PrintHoldRequestConfigurationBuilder extends JsonBuilder implements Builder { | ||
|
||
private final boolean printHoldRequestsEnabled; | ||
|
||
@Override | ||
public JsonObject create() { | ||
JsonObject request = new JsonObject(); | ||
request.put("printHoldRequestsEnabled", printHoldRequestsEnabled); | ||
return request; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/test/java/api/support/fixtures/ConfigurationsFixture.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package api.support.fixtures; | ||
|
||
import api.support.http.ResourceClient; | ||
|
||
import java.util.UUID; | ||
|
||
public class ConfigurationsFixture { | ||
private final ResourceClient client; | ||
private UUID printHoldRequestConfigurationEntryId = null; | ||
|
||
public ConfigurationsFixture(ResourceClient client) { | ||
this.client = client; | ||
} | ||
|
||
public void configurePrintHoldRequests(boolean printHoldRequestsEnabled) { | ||
deletePrintHoldRequestConfig(); | ||
printHoldRequestConfigurationEntryId = client.create( | ||
ConfigurationExample.setPrintHoldRequestsEnabled(printHoldRequestsEnabled)).getId(); | ||
} | ||
|
||
public void deletePrintHoldRequestConfig() { | ||
if (printHoldRequestConfigurationEntryId != null) { | ||
client.delete(printHoldRequestConfigurationEntryId); | ||
printHoldRequestConfigurationEntryId = null; | ||
} | ||
} | ||
} |