Tabnine Logo
rocks.inspectit.server.cache.impl
Code IndexAdd Tabnine to your IDE (free)

How to use rocks.inspectit.server.cache.impl

Best Java code snippets using rocks.inspectit.server.cache.impl (Showing top 20 results out of 315)

origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public IObjectSizes getObject() throws Exception {
  boolean compressedOops = UnderlyingSystemInfo.IS_COMPRESSED_OOPS;
  if (!compressedOops) {
    return new ObjectSizes64Bits();
  } else {
    return new ObjectSizes64BitsCompressedOops();
  }
}
origin: inspectIT/inspectIT

/**
 * Returns object security expansion rate based on the property set and given buffer size.
 *
 * @param bufferSize
 *            Buffer's size that expansion rate has to be calculated for.
 * @return Expansion rate in percentages.
 */
public float getObjectSecurityExpansionRate(long bufferSize) {
  return (getObjectSecurityExpansionRateBufferSize(bufferSize) + getObjectSecurityExpansionRateBufferOccupancy(bufferSize, getOldGenMax())) / 2;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 * <p>
 * This method is designed for multiply thread access.
 */
@Override
public void analyzeNext() throws InterruptedException {
  analyzeProcessor.process();
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 * <p>
 * This method is thread safe.
 */
public boolean shouldEvict() {
  return getOccupancyPercentage() > Float.intBitsToFloat(evictionOccupancyPercentage.get());
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
protected void processData(DefaultData defaultData, EntityManager entityManager) {
  buffer.put(new BufferElement<>((MethodSensorData) defaultData));
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@PostConstruct
public synchronized void start() {
  super.start();
}
origin: inspectIT/inspectIT

/**
 * Sets the current size of the buffer.
 *
 * @param currentSize
 *            Size in bytes.
 */
public void setCurrentSize(long currentSize) {
  this.currentSize.set(currentSize);
  notifyEvictionIfNeeded();
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 * <p>
 * This method also performs the cleaning of the indexing tree if the cleaning flag is on.
 * <p>
 * This method is designed for multiply thread access.
 */
@Override
public void indexNext() throws InterruptedException {
  indexProcessor.process();
}
origin: inspectIT/inspectIT

/**
 * Default constructor. Just calls super class constructor.
 *
 * @param buffer
 *            Buffer to work on.
 */
@Autowired
public BufferIndexer(IBuffer<?> buffer) {
  super(buffer, "buffer-indexing-thread");
  setPriority(NORM_PRIORITY);
}
origin: inspectIT/inspectIT

  /**
   * {@inheritDoc}
   */
  @Override
  public long getObjectSize(IObjectSizes objectSizes, boolean doAlign) {
    return getObjectSize(objectSizes);
  }
}
origin: inspectIT/inspectIT

  /**
   * {@inheritDoc}
   */
  @Override
  public long getObjectSize(IObjectSizes objectSizes, boolean doAlign) {
    return getObjectSize(objectSizes);
  }
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public void work() throws InterruptedException {
  getBuffer().evict();
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public void work() throws InterruptedException {
  getBuffer().indexNext();
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public void work() throws InterruptedException {
  getBuffer().analyzeNext();
}
origin: inspectIT/inspectIT

/**
 * Parameters generation for {@link #parametrizedExpansionRateTest(long)}.
 *
 * @return Buffer size.
 */
@DataProvider(name = "Buffer-Size-Provider")
public Object[][] bufferSizeParameterProvider() {
  int size = 50;
  Object[][] parameters = new Object[size][1];
  for (int i = 0; i < size; i++) {
    parameters[i][0] = getRandomLong(2000000000L);
  }
  return parameters;
}
origin: inspectIT/inspectIT

/**
 * Default constructor. Thread is set to be a daemon, to have highest priority and started.
 *
 * @param buffer
 *            Buffer to work on.
 * @param threadName
 *            How to name the thread.
 */
public BufferWorker(IBuffer<?> buffer, String threadName) {
  this.buffer = buffer;
  setName(threadName);
  setDaemon(true);
  setPriority(MAX_PRIORITY);
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@PostConstruct
public synchronized void start() {
  super.start();
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 * <p>
 * This method is thread safe.
 * <p>
 * Using this method does not provide any check for the supplied new maximum size. Thus, it is
 * responsibility of the user to assure that the given value is correct.
 */
@Override
public void setMaxSize(long maxSize) {
  this.maxSize.set(maxSize);
  notifyEvictionIfNeeded();
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@PostConstruct
public synchronized void start() {
  super.start();
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 * <p>
 * This method is thread safe.
 */
@Override
public void setEvictionOccupancyPercentage(float evictionOccupancyPercentage) {
  this.evictionOccupancyPercentage.set(Float.floatToIntBits(evictionOccupancyPercentage));
  notifyEvictionIfNeeded();
}
rocks.inspectit.server.cache.impl

Most used classes

  • AtomicBuffer
    Buffer uses atomic variables and references to handle the synchronization. Thus, non of its methods
  • BufferAnalyzer
    Thread that invokes the IBuffer#analyzeNext() method constantly.
  • BufferElement
    Simple implementation of the IBufferElement interface.
  • BufferIndexer
    Thread that invokes the IBuffer#indexNext() method constantly.
  • BufferProperties
    Set of properties for one buffer.
  • AnalyzeBufferElementProcessor,
  • BufferEvictor,
  • BufferPropertiesTest,
  • BufferWorker,
  • IndexBufferElementProcessor,
  • MemoryCalculationTest$BooleanTestClass,
  • MemoryCalculationTest$TestClass,
  • MemoryCalculationTest,
  • ObjectSizes64Bits,
  • ObjectSizes64BitsCompressedOops,
  • ObjectSizesFactory
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now