001/*-
002 * #%L
003 * Smile CDR - CDR
004 * %%
005 * Copyright (C) 2016 - 2024 Smile CDR, Inc.
006 * %%
007 * All rights reserved.
008 * #L%
009 */
010package ca.cdr.api.transactionlog;
011
012import java.util.HashMap;
013import java.util.Map;
014
015/**
016 * This is a thin wrapper around the mapping of Module ID to PID. For example, if you have 2 transaction log writers, one in MODULE_A and one in MODULE_B, a map might look like this
017 * after you tell the ITransactionLogStoringSvc to store a transaction log.
018 *
019 * {
020 *      'MODULE_A": 123,
021 *      "MODULE_B": 456
022 * }
023 *
024 * This class exists to make obvious the fact that when a transaction log is distributed to multiple writers, each will generate their own PIDs.
025 */
026public class TransactionLogIdentifiers extends HashMap<String, Long> {
027        private String myTransactionGuid;
028
029        public String getTransactionGuid() {
030                return myTransactionGuid;
031        }
032
033        public void setTransactionGuid(String myTxGuid) {
034                this.myTransactionGuid = myTxGuid;
035        }
036
037        public TransactionLogIdentifiers(Map<? extends String, ? extends Long> m) {
038                super(m);
039        }
040
041        public TransactionLogIdentifiers() {}
042}