Exemplo n.º 1
0
 public JournalNode(MessageFactory messageFactory, ProtobufSerializer serializer, Context context, String address, IJournalStorage storage)
 {
     _messageFactory = messageFactory;
     _serializer     = serializer;
     _context        = context;
     _address        = address;
     _storage        = storage;
 }
Exemplo n.º 2
0
 public RouterNode(MachineContext context, String routerRepAddress, String routerPubAddress, String domainReqAddress, IJournalStorage storage)
 {
     _context          = context;
     _routerRepAddress = routerRepAddress;
     _routerPubAddress = routerPubAddress;
     _domainReqAddress = domainReqAddress;
     _storage          = storage;
 }
Exemplo n.º 3
0
        //инициализация
        public PeriodLimitManager(List<LimitedPeriod> limitedPeriods, IJournalStorage journalStorage)
        {
            _limitedPeriods = new List<LimitedPeriod>(limitedPeriods);
            _journalStorage = journalStorage;

            _journalLock = new object();
            _lastJournalCleanUtc = DateTime.MinValue;
            _newInsertsAfterClean = 0;

            JournalCleanPeriod = SenderConstants.JOURNAL_STORAGE_CLEAN_PERIOD;
            JournalCleanAfterInsertsCount = SenderConstants.JOURNAL_STORAGE_CLEAN_INSERT_COUNT;
        }
Exemplo n.º 4
0
        //init
        public PeriodLimitCounter(List <LimitedPeriod> limitedPeriods, IJournalStorage journalStorage)
        {
            _limitedPeriods = new List <LimitedPeriod>(limitedPeriods);
            _journalStorage = journalStorage;

            _journalLock          = new object();
            _lastJournalCleanUtc  = DateTime.MinValue;
            _newInsertsAfterClean = 0;

            JournalCleanPeriod            = NotificationsConstants.JOURNAL_STORAGE_CLEAN_PERIOD;
            JournalCleanAfterInsertsCount = NotificationsConstants.JOURNAL_STORAGE_CLEAN_INSERT_COUNT;
        }
Exemplo n.º 5
0
        //init
        public AmazonLimitManager(List <LimitedPeriod> limitedPeriods, IJournalStorage journalStorage
                                  , AmazonCredentials credentials, ILogger logger)
            : base(limitedPeriods, journalStorage)
        {
            _credentials = credentials;
            _logger      = logger;

            _max24HourSend = new LimitedPeriod();
            _maxSecondSend = new LimitedPeriod();
            _limitedPeriods.Add(_max24HourSend);
            _limitedPeriods.Add(_maxSecondSend);
        }
Exemplo n.º 6
0
 public Journal(Uri journalLocation)
 {
     _journalStorage = new PersistantFolderQueue <T>(journalLocation.AbsolutePath);
 }