예제 #1
0
 public JournalNode(MessageFactory messageFactory, ProtobufSerializer serializer, Context context, String address, IJournalStorage storage)
 {
     _messageFactory = messageFactory;
     _serializer     = serializer;
     _context        = context;
     _address        = address;
     _storage        = storage;
 }
예제 #2
0
 public RouterNode(MachineContext context, String routerRepAddress, String routerPubAddress, String domainReqAddress, IJournalStorage storage)
 {
     _context          = context;
     _routerRepAddress = routerRepAddress;
     _routerPubAddress = routerPubAddress;
     _domainReqAddress = domainReqAddress;
     _storage          = storage;
 }
예제 #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;
        }
예제 #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;
        }
예제 #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);
        }
예제 #6
0
 public Journal(Uri journalLocation)
 {
     _journalStorage = new PersistantFolderQueue <T>(journalLocation.AbsolutePath);
 }