-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(demo): Added bootstrap config options
- Loading branch information
Julien Ruaux
committed
Feb 7, 2023
1 parent
0516b4e
commit a08f745
Showing
10 changed files
with
166 additions
and
145 deletions.
There are no files selected for viewing
88 changes: 0 additions & 88 deletions
88
demo/redis-sidecar-demo/src/main/java/com/redis/sidecar/demo/Config.java
This file was deleted.
Oops, something went wrong.
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
99 changes: 99 additions & 0 deletions
99
demo/redis-sidecar-demo/src/main/java/com/redis/sidecar/demo/SidecarDemoConfig.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,99 @@ | ||
package com.redis.sidecar.demo; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import com.redis.sidecar.BootstrapConfig; | ||
|
||
@Configuration | ||
@ConfigurationProperties(prefix = "") | ||
public class SidecarDemoConfig { | ||
|
||
private BootstrapConfig sidecar = new BootstrapConfig(); | ||
private DemoConfig demo = new DemoConfig(); | ||
|
||
public BootstrapConfig getSidecar() { | ||
return sidecar; | ||
} | ||
|
||
public void setSidecar(BootstrapConfig sidecar) { | ||
this.sidecar = sidecar; | ||
} | ||
|
||
public DemoConfig getDemo() { | ||
return demo; | ||
} | ||
|
||
public void setDemo(DemoConfig demo) { | ||
this.demo = demo; | ||
} | ||
|
||
public static class DemoConfig { | ||
|
||
private boolean flush; | ||
private int queryThreads; | ||
private int batchSize; | ||
private int customers; | ||
private int products; | ||
private int orders; | ||
private int orderdetails; | ||
|
||
public int getCustomers() { | ||
return customers; | ||
} | ||
|
||
public void setCustomers(int customers) { | ||
this.customers = customers; | ||
} | ||
|
||
public int getProducts() { | ||
return products; | ||
} | ||
|
||
public void setProducts(int products) { | ||
this.products = products; | ||
} | ||
|
||
public int getOrders() { | ||
return orders; | ||
} | ||
|
||
public void setOrders(int orders) { | ||
this.orders = orders; | ||
} | ||
|
||
public int getOrderdetails() { | ||
return orderdetails; | ||
} | ||
|
||
public void setOrderdetails(int orderdetails) { | ||
this.orderdetails = orderdetails; | ||
} | ||
|
||
public int getBatchSize() { | ||
return batchSize; | ||
} | ||
|
||
public void setBatchSize(int batchSize) { | ||
this.batchSize = batchSize; | ||
} | ||
|
||
public int getQueryThreads() { | ||
return queryThreads; | ||
} | ||
|
||
public void setQueryThreads(int queryThreads) { | ||
this.queryThreads = queryThreads; | ||
} | ||
|
||
public boolean isFlush() { | ||
return flush; | ||
} | ||
|
||
public void setFlush(boolean flush) { | ||
this.flush = flush; | ||
} | ||
|
||
} | ||
|
||
} |
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
Oops, something went wrong.