test_class.file: code/src/test/java/com/googlecode/cqengine/persistence/offheap/OffHeapPersistenceTest.java
test_class.identifier: OffHeapPersistenceTest
test_case.body: @Test
      public void testExpand() {
          final long bytesToExpand = 102400;  // Expand by 100KB;
          OffHeapPersistence<Car, Integer> persistence = OffHeapPersistence.onPrimaryKey(Car.CAR_ID);
          @SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
          IndexedCollection<Car> cars = new ConcurrentIndexedCollection<Car>(persistence);
          cars.addAll(CarFactory.createCollectionOfCars(50));
          persistence.compact();
          long initialBytesUsed = persistence.getBytesUsed();
          Assert.assertTrue("Initial bytes used should be greater than zero: " + initialBytesUsed, initialBytesUsed > 0);
          persistence.expand(bytesToExpand);
          long bytesUsedAfterExpanding = persistence.getBytesUsed();
          Assert.assertTrue("Bytes used after expanding (" + bytesUsedAfterExpanding + ") should have been increased by at least bytes to expand (" + bytesToExpand + ") above initial bytes used (" + initialBytesUsed + ")", bytesUsedAfterExpanding >= (initialBytesUsed + bytesToExpand));
          persistence.compact();
          long bytesUsedAfterCompaction = persistence.getBytesUsed();
          Assert.assertTrue("Bytes used after compaction (" + bytesUsedAfterCompaction + ") should be equal to initial bytes used (" + initialBytesUsed + ")", bytesUsedAfterCompaction == initialBytesUsed);
      }
test_case.class_method_signature: OffHeapPersistenceTest.testExpand()
test_case.full_signature: @Test public void testExpand()
test_case.identifier: testExpand
test_case.invocations: onPrimaryKey addAll createCollectionOfCars compact getBytesUsed assertTrue expand getBytesUsed assertTrue compact getBytesUsed assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExpand()
focal_class.declarator: INSTANCE_ID_GENERATOR = new AtomicInteger()
focal_class.modifier: static final
focal_class.original_string: static final AtomicInteger INSTANCE_ID_GENERATOR = new AtomicInteger();
focal_class.type: AtomicInteger
focal_class.var_name: INSTANCE_ID_GENERATOR
focal_class.declarator: primaryKeyAttribute
focal_class.modifier: final
focal_class.original_string: final SimpleAttribute<O, A> primaryKeyAttribute;
focal_class.type: SimpleAttribute<O, A>
focal_class.var_name: primaryKeyAttribute
focal_class.declarator: instanceName
focal_class.modifier: final
focal_class.original_string: final String instanceName;
focal_class.type: String
focal_class.var_name: instanceName
focal_class.declarator: sqLiteDataSource
focal_class.modifier: final
focal_class.original_string: final SQLiteDataSource sqLiteDataSource;
focal_class.type: SQLiteDataSource
focal_class.var_name: sqLiteDataSource
focal_class.declarator: DEFAULT_PROPERTIES = new Properties()
focal_class.modifier: static final
focal_class.original_string: static final Properties DEFAULT_PROPERTIES = new Properties();
focal_class.type: Properties
focal_class.var_name: DEFAULT_PROPERTIES
focal_class.declarator: persistentConnection
focal_class.modifier: volatile
focal_class.original_string: volatile Connection persistentConnection;
focal_class.type: Connection
focal_class.var_name: persistentConnection
focal_class.declarator: closed = false
focal_class.modifier: volatile
focal_class.original_string: volatile boolean closed = false;
focal_class.type: boolean
focal_class.var_name: closed
focal_class.declarator: readWriteLock = new ReentrantReadWriteLock(true)
focal_class.modifier: final
focal_class.original_string: final ReadWriteLock readWriteLock = new ReentrantReadWriteLock(true);
focal_class.type: ReadWriteLock
focal_class.var_name: readWriteLock
focal_class.file: code/src/main/java/com/googlecode/cqengine/persistence/offheap/OffHeapPersistence.java
focal_class.identifier: OffHeapPersistence
focal_class.interfaces: implements SQLitePersistence<O, A>, Closeable
focal_class.class_method_signature: OffHeapPersistence.OffHeapPersistence(SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties)
focal_class.full_signature: protected  OffHeapPersistence(SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties)
focal_class.identifier: OffHeapPersistence
focal_class.modifiers: protected
focal_class.parameters: (SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties)
focal_class.signature:  OffHeapPersistence(SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties)
focal_class.class_method_signature: OffHeapPersistence.getPrimaryKeyAttribute()
focal_class.full_signature: @Override public SimpleAttribute<O, A> getPrimaryKeyAttribute()
focal_class.identifier: getPrimaryKeyAttribute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SimpleAttribute<O, A>
focal_class.signature: SimpleAttribute<O, A> getPrimaryKeyAttribute()
focal_class.class_method_signature: OffHeapPersistence.getInstanceName()
focal_class.full_signature: public String getInstanceName()
focal_class.identifier: getInstanceName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getInstanceName()
focal_class.class_method_signature: OffHeapPersistence.getConnection(Index<?> index, QueryOptions queryOptions)
focal_class.full_signature: @Override public Connection getConnection(Index<?> index, QueryOptions queryOptions)
focal_class.identifier: getConnection
focal_class.modifiers: @Override public
focal_class.parameters: (Index<?> index, QueryOptions queryOptions)
focal_class.return: Connection
focal_class.signature: Connection getConnection(Index<?> index, QueryOptions queryOptions)
focal_class.class_method_signature: OffHeapPersistence.getConnectionInternal(Index<?> index, QueryOptions queryOptions)
focal_class.full_signature: protected Connection getConnectionInternal(Index<?> index, QueryOptions queryOptions)
focal_class.identifier: getConnectionInternal
focal_class.modifiers: protected
focal_class.parameters: (Index<?> index, QueryOptions queryOptions)
focal_class.return: Connection
focal_class.signature: Connection getConnectionInternal(Index<?> index, QueryOptions queryOptions)
focal_class.class_method_signature: OffHeapPersistence.supportsIndex(Index<O> index)
focal_class.full_signature: @Override public boolean supportsIndex(Index<O> index)
focal_class.identifier: supportsIndex
focal_class.modifiers: @Override public
focal_class.parameters: (Index<O> index)
focal_class.return: boolean
focal_class.signature: boolean supportsIndex(Index<O> index)
focal_class.class_method_signature: OffHeapPersistence.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: OffHeapPersistence.getBytesUsed()
focal_class.full_signature: @Override public long getBytesUsed()
focal_class.identifier: getBytesUsed
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getBytesUsed()
focal_class.class_method_signature: OffHeapPersistence.compact()
focal_class.full_signature: @Override public void compact()
focal_class.identifier: compact
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void compact()
focal_class.class_method_signature: OffHeapPersistence.expand(long numBytes)
focal_class.full_signature: @Override public void expand(long numBytes)
focal_class.identifier: expand
focal_class.modifiers: @Override public
focal_class.parameters: (long numBytes)
focal_class.return: void
focal_class.signature: void expand(long numBytes)
focal_class.class_method_signature: OffHeapPersistence.finalize()
focal_class.full_signature: @Override protected void finalize()
focal_class.identifier: finalize
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void finalize()
focal_class.class_method_signature: OffHeapPersistence.equals(Object o)
focal_class.full_signature: @Override public boolean equals(Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(Object o)
focal_class.class_method_signature: OffHeapPersistence.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: OffHeapPersistence.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: OffHeapPersistence.createObjectStore()
focal_class.full_signature: @Override public SQLiteObjectStore<O, A> createObjectStore()
focal_class.identifier: createObjectStore
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SQLiteObjectStore<O, A>
focal_class.signature: SQLiteObjectStore<O, A> createObjectStore()
focal_class.class_method_signature: OffHeapPersistence.createIdentityIndex()
focal_class.full_signature: @Override public SQLiteOffHeapIdentityIndex<A, O> createIdentityIndex()
focal_class.identifier: createIdentityIndex
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SQLiteOffHeapIdentityIndex<A, O>
focal_class.signature: SQLiteOffHeapIdentityIndex<A, O> createIdentityIndex()
focal_class.class_method_signature: OffHeapPersistence.openRequestScopeResources(QueryOptions queryOptions)
focal_class.full_signature: @Override public void openRequestScopeResources(QueryOptions queryOptions)
focal_class.identifier: openRequestScopeResources
focal_class.modifiers: @Override public
focal_class.parameters: (QueryOptions queryOptions)
focal_class.return: void
focal_class.signature: void openRequestScopeResources(QueryOptions queryOptions)
focal_class.class_method_signature: OffHeapPersistence.closeRequestScopeResources(QueryOptions queryOptions)
focal_class.full_signature: @Override public void closeRequestScopeResources(QueryOptions queryOptions)
focal_class.identifier: closeRequestScopeResources
focal_class.modifiers: @Override public
focal_class.parameters: (QueryOptions queryOptions)
focal_class.return: void
focal_class.signature: void closeRequestScopeResources(QueryOptions queryOptions)
focal_class.class_method_signature: OffHeapPersistence.onPrimaryKey(SimpleAttribute<O, A> primaryKeyAttribute)
focal_class.full_signature: public static OffHeapPersistence<O, A> onPrimaryKey(SimpleAttribute<O, A> primaryKeyAttribute)
focal_class.identifier: onPrimaryKey
focal_class.modifiers: public static
focal_class.parameters: (SimpleAttribute<O, A> primaryKeyAttribute)
focal_class.return: OffHeapPersistence<O, A>
focal_class.signature: OffHeapPersistence<O, A> onPrimaryKey(SimpleAttribute<O, A> primaryKeyAttribute)
focal_class.class_method_signature: OffHeapPersistence.onPrimaryKeyWithProperties(SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties)
focal_class.full_signature: public static OffHeapPersistence<O, A> onPrimaryKeyWithProperties(SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties)
focal_class.identifier: onPrimaryKeyWithProperties
focal_class.modifiers: public static
focal_class.parameters: (SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties)
focal_class.return: OffHeapPersistence<O, A>
focal_class.signature: OffHeapPersistence<O, A> onPrimaryKeyWithProperties(SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties)
focal_method.body: @Override
      public void expand(long numBytes) {
          Connection connection = null;
          try {
              connection = getConnectionInternal(null, noQueryOptions());
              DBQueries.expandDatabase(connection, numBytes);
          }
          finally {
              DBUtils.closeQuietly(connection);
          }
      }
focal_method.class_method_signature: OffHeapPersistence.expand(long numBytes)
focal_method.full_signature: @Override public void expand(long numBytes)
focal_method.identifier: expand
focal_method.invocations: getConnectionInternal noQueryOptions expandDatabase closeQuietly
focal_method.modifiers: @Override public
focal_method.parameters: (long numBytes)
focal_method.return: void
focal_method.signature: void expand(long numBytes)