Example #1
0
        public ConsecutiveInFlightCache(int capacity, long maxBytes, InFlightCacheMonitor monitor, bool enabled)
        {
            this._cache     = new ConsecutiveCache <RaftLogEntry>(capacity);
            this._evictions = new RaftLogEntry[capacity];

            this._maxBytes = maxBytes;
            this._monitor  = monitor;
            this._enabled  = enabled;

            monitor.MaxBytes    = maxBytes;
            monitor.MaxElements = capacity;
        }
Example #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup()
        public virtual void Setup()
        {
            _cache = new ConsecutiveCache <int>(_capacity);
        }