clientCounter++; if (!initialized) { OGlobalConfiguration.dumpConfiguration(System.out);
public ODatabasePoolAbstract(final Object iOwner, final int iMinSize, final int iMaxSize, final long idleTimeout, final long timeBetweenEvictionRunsMillis) { this(iOwner, iMinSize, iMaxSize, OGlobalConfiguration.CLIENT_CONNECT_POOL_WAIT_TIMEOUT.getValueAsInteger(), idleTimeout, timeBetweenEvictionRunsMillis); }
public static OBinaryConverter getConverter() { boolean useUnsafe = OGlobalConfiguration.MEMORY_USE_UNSAFE.getValueAsBoolean(); if (useUnsafe && unsafeWasDetected) return OUnsafeBinaryConverter.INSTANCE; return OSafeBinaryConverter.INSTANCE; } }
public OLuceneIndexEngine(OLuceneIndexManagerAbstract delegate, String indexType) { super(OGlobalConfiguration.ENVIRONMENT_CONCURRENT.getValueAsBoolean(), OGlobalConfiguration.MVRBTREE_TIMEOUT .getValueAsInteger(), true); this.lucene = delegate; this.indexType = indexType; }
private OSocketFactory(final OContextConfiguration iConfig) { config = iConfig; useSSL = iConfig.getValueAsBoolean(OGlobalConfiguration.CLIENT_USE_SSL); keyStorePath = (String) iConfig.getValue(OGlobalConfiguration.CLIENT_SSL_KEYSTORE); keyStorePassword = (String) iConfig.getValue(OGlobalConfiguration.CLIENT_SSL_KEYSTORE_PASSWORD); trustStorePath = (String) iConfig.getValue(OGlobalConfiguration.CLIENT_SSL_TRUSTSTORE); trustStorePassword = (String) iConfig.getValue(OGlobalConfiguration.CLIENT_SSL_TRUSTSTORE_PASSWORD); }
private void autoInitClusters() { if (getContextConfiguration().getValueAsInteger(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS) == 0) { final int cpus = Runtime.getRuntime().availableProcessors(); getContextConfiguration().setValue(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS, cpus > 64 ? 64 : cpus); } }
public void setMinimumClusters(final int minimumClusters) { lock.acquireWriteLock(); try { getContextConfiguration().setValue(OGlobalConfiguration.CLASS_MINIMUM_CLUSTERS, minimumClusters); autoInitClusters(); } finally { lock.releaseWriteLock(); } }
public OStorageConfigurationImpl(final OAbstractPaginatedStorage iStorage, Charset streamCharset) { lock.acquireWriteLock(); try { this.streamCharset = streamCharset; storage = iStorage; initConfiguration(new OContextConfiguration()); clear(); } finally { lock.releaseWriteLock(); } }
private void phySegmentToStream(final StringBuilder iBuffer, final OStorageSegmentConfiguration iSegment) { write(iBuffer, iSegment.location); write(iBuffer, iSegment.maxSize); write(iBuffer, iSegment.fileType); write(iBuffer, iSegment.fileStartSize); write(iBuffer, iSegment.fileMaxSize); write(iBuffer, iSegment.fileIncrementSize); write(iBuffer, iSegment.defrag); write(iBuffer, iSegment.infoFiles.length); for (OStorageFileConfiguration f : iSegment.infoFiles) fileToStream(iBuffer, f); }
public String getLocation() { if (location != null) return location; return root != null ? root.getDirectory() : null; } }
public void registerInStorageConfig(final OStorageConfigurationImpl root) { root.addCluster(config); root.update(); }
/** * Calculates the total configured maximum size of all OrientDB caches. * * @return the total maximum size of all OrientDB caches in bytes. */ private static long getMaxCacheMemorySize() { return OGlobalConfiguration.DISK_CACHE_SIZE.getValueAsLong() * 1024 * 1024; }
/** * @inheritDoc */ @Override public final String getCreatedAtVersion() { return configuration.getCreatedAtVersion(); }
@Override public void configure(OStorage iStorage, OStorageClusterConfiguration iConfig) throws IOException { binaryVersion = iConfig.getBinaryVersion(); }
private long calculateReadCacheMaxMemory(final long cacheSize) { return (long) (cacheSize * ((100 - OGlobalConfiguration.DISK_WRITE_CACHE_PART.getValueAsInteger()) / 100.0)); }
private OSocketFactory(OContextConfiguration iConfig) { config = iConfig; useSSL = iConfig.getValueAsBoolean(OGlobalConfiguration.CLIENT_USE_SSL); keyStorePath = (String) iConfig .getValue(OGlobalConfiguration.CLIENT_SSL_KEYSTORE); keyStorePassword = (String) iConfig .getValue(OGlobalConfiguration.CLIENT_SSL_KEYSTORE_PASSWORD); trustStorePath = (String) iConfig .getValue(OGlobalConfiguration.CLIENT_SSL_TRUSTSTORE); trustStorePassword = (String) iConfig .getValue(OGlobalConfiguration.CLIENT_SSL_TRUSTSTORE_PASSWORD); }
public void close() throws IOException { lock.acquireWriteLock(); try { clear(); initConfiguration(new OContextConfiguration()); } finally { lock.releaseWriteLock(); } }
@Override public long getDistributedTimeout() { return OGlobalConfiguration.DISTRIBUTED_COMMAND_TASK_SYNCH_TIMEOUT.getValueAsLong(); }
public OOneEntryPerKeyLockManager(final boolean iEnabled, final int iAcquireTimeout, final int amountOfCachedInstances) { this(iEnabled, iAcquireTimeout, OGlobalConfiguration.ENVIRONMENT_LOCK_MANAGER_CONCURRENCY_LEVEL.getValueAsInteger(), amountOfCachedInstances); }