-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added DataMapper, removed Doubles from code and replaced with Long for Price and Quantity (decimal offset to be determined)
- Loading branch information
john
authored and
john
committed
Sep 13, 2023
1 parent
ac784e0
commit 8dc936b
Showing
24 changed files
with
315 additions
and
146 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
exchange/src/main/java/com/alignmentsystems/matching/DataMapper.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,43 @@ | ||
package com.alignmentsystems.matching; | ||
/****************************************************************************** | ||
* | ||
* Author : John Greenan | ||
* Contact : sales@alignment-systems.com | ||
* Date : 13th September 2023 | ||
* Copyright : Alignment Systems Ltd 2023 | ||
* Project : Alignment Matching Toy | ||
* Artefact : DataMapper | ||
* Description : | ||
*****************************************************************************/ | ||
import java.util.HashMap; | ||
|
||
/** | ||
* @author <a href="mailto:sales@alignment-systems.com">John Greenan</a> | ||
* | ||
*/ | ||
public class DataMapper { | ||
private HashMap<String, Long> memberFIXSenderCompIdToExchangeIdMap = new HashMap<String, Long>(); | ||
private HashMap<String, Long> memberInstrumentIdToExchangeInstrumentIdMap = new HashMap<String, Long>(); | ||
|
||
protected HashMap<String, Long> getMemberFIXSenderCompIdToExchangeIdMap() { | ||
return memberFIXSenderCompIdToExchangeIdMap; | ||
} | ||
|
||
protected HashMap<String, Long> getMemberInstrumentIdToExchangeInstrumentIdMap() { | ||
return memberInstrumentIdToExchangeInstrumentIdMap; | ||
} | ||
|
||
public DataMapper() { | ||
Long added = Long.MIN_VALUE; | ||
memberFIXSenderCompIdToExchangeIdMap.put("MEMBER_A", added); | ||
added++; | ||
memberFIXSenderCompIdToExchangeIdMap.put("MEMBER_B", added); | ||
added++; | ||
memberFIXSenderCompIdToExchangeIdMap.put("EXCHANGE", added); | ||
|
||
|
||
memberInstrumentIdToExchangeInstrumentIdMap.put("Badger.W", Long.MAX_VALUE); | ||
|
||
} | ||
|
||
} |
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
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
38 changes: 38 additions & 0 deletions
38
exchange/src/main/java/com/alignmentsystems/matching/Sender.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,38 @@ | ||
package com.alignmentsystems.matching; | ||
/****************************************************************************** | ||
* | ||
* Author : John Greenan | ||
* Contact : sales@alignment-systems.com | ||
* Date : 13th September 2023 | ||
* Copyright : Alignment Systems Ltd 2023 | ||
* Project : Alignment Matching Toy | ||
* Artefact : Sender | ||
* Description : | ||
*****************************************************************************/ | ||
import java.nio.ByteBuffer; | ||
|
||
/** | ||
* @author <a href="mailto:sales@alignment-systems.com">John Greenan</a> | ||
* | ||
*/ | ||
public class Sender { | ||
public Sender(ByteBuffer bb, String symbol, String orderId) { | ||
super(); | ||
this.bb = bb; | ||
this.symbol = symbol; | ||
this.orderId = orderId; | ||
} | ||
ByteBuffer bb = null; | ||
String symbol = null; | ||
String orderId = null; | ||
|
||
public ByteBuffer getBb() { | ||
return bb; | ||
} | ||
public String getSymbol() { | ||
return symbol; | ||
} | ||
public String getOrderId() { | ||
return orderId; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#Wed Sep 13 19:44:30 AEST 2023 | ||
VERSION_BUILD=574 | ||
#Thu Sep 14 00:32:04 AEST 2023 | ||
VERSION_BUILD=589 |
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.