org.apache.derby.impl.sql.catalog
Class SequenceRange

java.lang.Object
  extended by org.apache.derby.impl.sql.catalog.SequenceRange
All Implemented Interfaces:
SequencePreallocator

public class SequenceRange
extends java.lang.Object
implements SequencePreallocator

Default Derby logic for determining how many values to pre-allocate for an identity column or sequence.


Field Summary
private  int _rangeSize
           
private static int DEFAULT_PREALLOCATION_COUNT
          Default number of values to pre-allocate.
 
Constructor Summary
SequenceRange()
          0-arg constructore needed to satisfy the SequencePreallocator contract.
SequenceRange(int rangeSize)
           
 
Method Summary
 int nextRangeSize(java.lang.String schemaName, java.lang.String sequenceName)
           This method returns the size of the next pre-allocated range for the specified sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PREALLOCATION_COUNT

private static final int DEFAULT_PREALLOCATION_COUNT
Default number of values to pre-allocate. Other databases use a preallocation size of 20 (see DERBY-4437). We boosted this to 100 in order to get better concurrency, after fixing correctness problems in pre-allocation (see DERBY-5493).

See Also:
Constant Field Values

_rangeSize

private int _rangeSize
Constructor Detail

SequenceRange

public SequenceRange()

0-arg constructore needed to satisfy the SequencePreallocator contract.


SequenceRange

public SequenceRange(int rangeSize)
Method Detail

nextRangeSize

public int nextRangeSize(java.lang.String schemaName,
                         java.lang.String sequenceName)
Description copied from interface: SequencePreallocator

This method returns the size of the next pre-allocated range for the specified sequence. Names are case-sensitive, as specified in CREATE SEQUENCE and CREATE TABLE statements.

Specified by:
nextRangeSize in interface SequencePreallocator
Parameters:
schemaName - Name of schema holding the sequence.
sequenceName - Specific name of the sequence.

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.