public SizeControlledConnectionPool() { this.managedClientQuantity = 0; this.logger = LoggerHelper.CreateLogger(this.GetType()); this.referencedClients = new HashSet<CassandraClient>(); this.idleClients = new Queue<CassandraClient>(); this.controlIdleClientSizeTimer = new Timer(new TimerCallback(this.controlIdleClientSizeMethod), null, DEFAULTDUETIME, Timeout.Infinite); }
public RoundRobinEndpointManager() { logger = LoggerHelper.CreateLogger(this.GetType()); this.configuredEndpoints = new List<CassandraEndpoint>(); this.availableEndpoints = new Queue<CassandraEndpoint>(this.configuredEndpoints); this.blackListedEndpoints = new HashSet<CassandraEndpoint>(); this.endpointRecoveryTimer = new Timer(new TimerCallback(this.EndpointRecoveryMethod), null, Timeout.Infinite, Timeout.Infinite); }
public static LoggerHelper CreateLogger(Type classType) { LoggerHelper helper = null; lock (LOGGERHELPERS) { if (!LOGGERHELPERS.TryGetValue(classType, out helper)) { helper = new LoggerHelper(classType.ToString()); LOGGERHELPERS.Add(classType, helper); } } return helper; }
public BufferedTransportConnectionFactory() { this.logger = LoggerHelper.CreateLogger(this.GetType()); this.isBufferSizeSet = false; this.bufferSize = 0; }
public DefaultTransportConnectionFactory() { this.logger = LoggerHelper.CreateLogger(this.GetType()); }
/// <summary> /// Read the configuration section, create logger, create clusters /// <remarks>can throw <see cref="Aquiles.Exceptions.AquilesException"/> in case something went wrong</remarks> /// </summary> private void InstanceInitialize() { long startedTicks = DateTime.Now.Ticks; this.configuration = (AquilesConfigurationSection)ConfigurationManager.GetSection("aquilesConfiguration"); if (this.configuration != null) { CreateLogger(); logger = LoggerHelper.CreateLogger(typeof(AquilesHelper)); CreateClusters(); long durationTicks = DateTime.Now.Ticks - startedTicks; TimeSpan a = new TimeSpan(durationTicks); logger.Info(logger.StringFormatInvariantCulture("Startup took {0} ms.", a.Milliseconds)); } else { throw new AquilesException("Configuration not loaded."); } }
/// <summary> /// ctor /// </summary> public BatchMutateCommand() : base() { this.logger = LoggerHelper.CreateLogger(this.GetType()); }
/// <summary> /// ctor /// </summary> public GetCommand() : base() { logger = LoggerHelper.CreateLogger(this.GetType()); }
public NoConnectionPool() { this.logger = LoggerHelper.CreateLogger(typeof(NoConnectionPool)); }
private DefaultAquilesConnection() { this.isClientHealthy = true; this.logger = LoggerHelper.CreateLogger(this.GetType()); }
/// <summary> /// ctor /// </summary> public InsertCommand() : base() { this.logger = LoggerHelper.CreateLogger(this.GetType()); }