public SimpleFileStorage(FileSystemAbstraction fileSystem, File directory, string name, ChannelMarshal <T> marshal, LogProvider logProvider) { this._fileSystem = fileSystem; this._log = logProvider.getLog(this.GetType()); this._file = new File(DurableStateStorage.StateDir(directory, name), name); this._marshal = marshal; }
public UpdatePullerScheduler(JobScheduler scheduler, LogProvider logProvider, UpdatePuller updatePullingThread, long pullIntervalMillis) { this._scheduler = scheduler; this._log = logProvider.getLog(this.GetType()); this._updatePuller = updatePullingThread; this._pullIntervalMillis = pullIntervalMillis; }
public RaftOutbound(CoreTopologyService coreTopologyService, Outbound <AdvertisedSocketAddress, Message> outbound, System.Func <Optional <ClusterId> > clusterIdentity, LogProvider logProvider, long logThresholdMillis) { this._coreTopologyService = coreTopologyService; this._outbound = outbound; this._clusterIdentity = clusterIdentity; this._log = logProvider.getLog(this.GetType()); this._unknownAddressMonitor = new UnknownAddressMonitor(_log, Clocks.systemClock(), logThresholdMillis); }
internal OnlineIndexSamplingJob(long indexId, IndexProxy indexProxy, IndexStoreView storeView, string indexUserDescription, LogProvider logProvider) { this._indexId = indexId; this._indexProxy = indexProxy; this._storeView = storeView; this._log = logProvider.getLog(this.GetType()); this._indexUserDescription = indexUserDescription; }
public CoreStateDownloaderService(JobScheduler jobScheduler, CoreStateDownloader downloader, CommandApplicationProcess applicationProcess, LogProvider logProvider, Org.Neo4j.causalclustering.helper.TimeoutStrategy_Timeout downloaderPauseStrategy, System.Func <DatabaseHealth> dbHealth, Monitors monitors) { this._jobScheduler = jobScheduler; this._downloader = downloader; this._applicationProcess = applicationProcess; this._log = logProvider.getLog(this.GetType()); this._downloaderPauseStrategy = downloaderPauseStrategy; this._dbHealth = dbHealth; this._monitors = monitors; }
public TxPullRequestHandler(CatchupServerProtocol protocol, System.Func <StoreId> storeIdSupplier, System.Func <bool> databaseAvailable, System.Func <NeoStoreDataSource> dataSourceSupplier, Monitors monitors, LogProvider logProvider) { this._protocol = protocol; this._storeIdSupplier = storeIdSupplier; this._databaseAvailable = databaseAvailable; DependencyResolver dependencies = dataSourceSupplier().DependencyResolver; this._transactionIdStore = dependencies.ResolveDependency(typeof(TransactionIdStore)); this._logicalTransactionStore = dependencies.ResolveDependency(typeof(LogicalTransactionStore)); this._monitor = monitors.NewMonitor(typeof(TxPullRequestsMonitor)); this._log = logProvider.getLog(this.GetType()); }
/// <summary> /// {@inheritDoc} /// </summary> public override OUTPUT Apply(INPUT retriableInput, System.Func <INPUT, OUTPUT> retriable, System.Predicate <OUTPUT> wasRetrySuccessful) { Log log = _logProvider.getLog(typeof(MultiRetryStrategy)); OUTPUT result = retriable(retriableInput); int currentIteration = 0; while (!wasRetrySuccessful(result) && currentIteration++ < _retries) { log.Debug("Try attempt was unsuccessful for input: %s\n", retriableInput); _sleeper.accept(_delayInMillis); result = retriable(retriableInput); } return(result); }
internal RaftLogShipper(Outbound <MemberId, Org.Neo4j.causalclustering.core.consensus.RaftMessages_RaftMessage> outbound, LogProvider logProvider, ReadableRaftLog raftLog, Clock clock, TimerService timerService, MemberId leader, MemberId follower, long leaderTerm, long leaderCommit, long retryTimeMillis, int catchupBatchSize, int maxAllowedShippingLag, InFlightCache inFlightCache) { this._outbound = outbound; this._timerService = timerService; this._catchupBatchSize = catchupBatchSize; this._maxAllowedShippingLag = maxAllowedShippingLag; this._log = logProvider.getLog(this.GetType()); this._raftLog = raftLog; this._clock = clock; this._follower = follower; this._leader = leader; this._retryTimeMillis = retryTimeMillis; this._lastLeaderContext = new LeaderContext(leaderTerm, leaderCommit); this._inFlightCache = inFlightCache; }
// --------- HELPERS ---------- //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() { _config = mock(typeof(Config)); _mockLogProvider = mock(typeof(LogProvider)); Log mockLog = mock(typeof(Log)); when(_mockLogProvider.getLog(anyString())).thenReturn(mockLog); when(mockLog.DebugEnabled).thenReturn(true); when(_config.get(SecuritySettings.property_level_authorization_enabled)).thenReturn(false); when(_config.get(SecuritySettings.auth_cache_ttl)).thenReturn(Duration.ZERO); when(_config.get(SecuritySettings.auth_cache_max_capacity)).thenReturn(10); when(_config.get(SecuritySettings.auth_cache_use_ttl)).thenReturn(true); when(_config.get(SecuritySettings.security_log_successful_authentication)).thenReturn(false); when(_config.get(GraphDatabaseSettings.auth_max_failed_attempts)).thenReturn(3); when(_config.get(GraphDatabaseSettings.auth_lock_time)).thenReturn(Duration.ofSeconds(5)); }
internal virtual IndexProxy CreateOnlineIndexProxy(StoreIndexDescriptor descriptor) { try { IndexAccessor onlineAccessor = OnlineAccessorFromProvider(descriptor, _samplingConfig); CapableIndexDescriptor capableIndexDescriptor = _providerMap.withCapabilities(descriptor); IndexProxy proxy; proxy = new OnlineIndexProxy(capableIndexDescriptor, onlineAccessor, _storeView, false); proxy = new ContractCheckingIndexProxy(proxy, true); return(proxy); } catch (IOException e) { _logProvider.getLog(this.GetType()).error("Failed to open index: " + descriptor.Id + " (" + descriptor.UserDescription(_tokenNameLookup) + "), requesting re-population.", e); return(CreateRecoveringIndexProxy(descriptor)); } }
internal WaitForUpToDateStore(CatchupPollingProcess catchupProcess, LogProvider logProvider) { this._catchupProcess = catchupProcess; this._log = logProvider.getLog(this.GetType()); }
public ServerMessageTypeHandler(CatchupServerProtocol protocol, LogProvider logProvider) { this._protocol = protocol; this._log = logProvider.getLog(this.GetType()); }
public BranchDetectingTxVerifier(LogProvider logProvider, TransactionChecksumLookup txChecksumLookup) { this._log = logProvider.getLog(this.GetType()); this._txChecksumLookup = txChecksumLookup; }
public PreFlightTasks(LogProvider logProvider, params PreflightTask[] tasks) { this._tasks = tasks; this._log = logProvider.getLog(this.GetType()); }
public ClusterLeaveReelectionListener(Election election, LogProvider logProvider) { this._election = election; this._log = logProvider.getLog(this.GetType()); }
public FileHeaderHandler(CatchupClientProtocol protocol, CatchUpResponseHandler handler, LogProvider logProvider) { this._protocol = protocol; this._handler = handler; this._log = logProvider.getLog(this.GetType()); }
public ClientMessageTypeHandler(CatchupClientProtocol protocol, LogProvider logProvider) { this._protocol = protocol; this._log = logProvider.getLog(this.GetType()); }
public HeartbeatReelectionListener(Election election, LogProvider logProvider) { this._election = election; this._log = logProvider.getLog(this.GetType()); }
public override ILogger GetLogger(string name) { return(new HazelcastLogger(_logProvider.getLog(name), _minLevel)); }
private Log Log() { return(_logProvider.getLog(this.GetType())); }
public CypherExecutor(Database database, LogProvider logProvider) { this._database = database; _log = logProvider.getLog(this.GetType()); }
public HeartbeatLeftListener(HeartbeatContext heartbeatContext, LogProvider logProvider) { this._heartbeatContext = heartbeatContext; this._log = logProvider.getLog(this.GetType()); }
public ExplicitIndexMigrator(FileSystemAbstraction fileSystem, ExplicitIndexProvider explicitIndexProvider, LogProvider logProvider) : base("Explicit indexes") { this._fileSystem = fileSystem; this._explicitIndexProvider = explicitIndexProvider; this._log = logProvider.getLog(this.GetType()); }
public HighAvailabilityLogger(LogProvider logProvider, InstanceId myId) { this._log = logProvider.getLog(this.GetType()); this._myId = myId; }