Skip to content

Commit

Permalink
Merge branch 'finos:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
keikeicheung authored Jun 18, 2024
2 parents 9948df7 + 4fd7740 commit a6929e3
Show file tree
Hide file tree
Showing 203 changed files with 6,682 additions and 3,069 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.finos.toolbox.time.Clock
import org.finos.vuu.core.module.auths.PermissionSet
import org.finos.vuu.core.module.simul.model.{ChildOrder, ParentOrder}

import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.{ConcurrentHashMap, DelayQueue, Delayed, TimeUnit}

//case class ParentOrder(id: Int, ric: String, price: Double, quantity: Int, side: String, account: String, exchange: String, ccy: String, algo: String, volLimit: Double, filledQty: Int, openQty: Int, averagePrice: Double, status: String, remainingQty: Int, activeChildren: Int, owner: String = "", permissionMask: Int = 0)
Expand Down Expand Up @@ -82,7 +83,7 @@ class ParentChildOrdersModel(implicit clock: Clock,
private final val queue = new DelayQueue[DelayQueueAction]()
private final var cycleNumber = 0l
private var orderId = 0
private var childOrderId = 0
private var childOrderId = new AtomicInteger(0);
private final val MAX_ORDERS = 7000
private var parentOrderCount = 0;

Expand Down Expand Up @@ -308,8 +309,7 @@ class ParentChildOrdersModel(implicit clock: Clock,
}

def createChild(parentOrder: ParentOrder): ChildOrder = {
val childId = childOrderId
childOrderId += 1
val childId = childOrderId.getAndIncrement()
val quantity = parentOrder.quantity
val side = parentOrder.side
val account = parentOrder.account
Expand Down
Loading

0 comments on commit a6929e3

Please sign in to comment.