id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
60,600
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java
ExportSequenceNumberTracker.getFirstGap
public Pair<Long, Long> getFirstGap() { if (m_map.isEmpty() || size() < 2) { return null; } Iterator<Range<Long>> iter = m_map.asRanges().iterator(); long start = end(iter.next()) + 1; long end = start(iter.next()) - 1; return new Pair<Long, Long>(start, end);...
java
public Pair<Long, Long> getFirstGap() { if (m_map.isEmpty() || size() < 2) { return null; } Iterator<Range<Long>> iter = m_map.asRanges().iterator(); long start = end(iter.next()) + 1; long end = start(iter.next()) - 1; return new Pair<Long, Long>(start, end);...
[ "public", "Pair", "<", "Long", ",", "Long", ">", "getFirstGap", "(", ")", "{", "if", "(", "m_map", ".", "isEmpty", "(", ")", "||", "size", "(", ")", "<", "2", ")", "{", "return", "null", ";", "}", "Iterator", "<", "Range", "<", "Long", ">", ">"...
Find range of the first gap if it exists. If there is only one entry, range after the first entry is NOT a gap. @return start and end sequence number of the first gap, if gap doesn't exist return null
[ "Find", "range", "of", "the", "first", "gap", "if", "it", "exists", ".", "If", "there", "is", "only", "one", "entry", "range", "after", "the", "first", "entry", "is", "NOT", "a", "gap", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L251-L259
60,601
VoltDB/voltdb
src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java
ExportSequenceNumberTracker.sizeInSequence
public int sizeInSequence() { int sequence = 0; if (m_map.isEmpty()) { return sequence; } final Iterator<Range<Long>> iter = m_map.asRanges().iterator(); while (iter.hasNext()) { Range<Long> range = iter.next(); sequence += end(range) - start(r...
java
public int sizeInSequence() { int sequence = 0; if (m_map.isEmpty()) { return sequence; } final Iterator<Range<Long>> iter = m_map.asRanges().iterator(); while (iter.hasNext()) { Range<Long> range = iter.next(); sequence += end(range) - start(r...
[ "public", "int", "sizeInSequence", "(", ")", "{", "int", "sequence", "=", "0", ";", "if", "(", "m_map", ".", "isEmpty", "(", ")", ")", "{", "return", "sequence", ";", "}", "final", "Iterator", "<", "Range", "<", "Long", ">", ">", "iter", "=", "m_ma...
Get total number of sequence from the tracker. @return
[ "Get", "total", "number", "of", "sequence", "from", "the", "tracker", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L285-L299
60,602
VoltDB/voltdb
examples/callcenter/client/callcenter/CallCenterApp.java
CallCenterApp.sendEvent
void sendEvent(CallEvent call) throws NoConnectionsException, IOException, ProcCallException { if (call.endTS == null) { assert(call.startTS != null); // null callback isn't ideal for production code, but errors are tracked // here through client stats so we'll let it slide ...
java
void sendEvent(CallEvent call) throws NoConnectionsException, IOException, ProcCallException { if (call.endTS == null) { assert(call.startTS != null); // null callback isn't ideal for production code, but errors are tracked // here through client stats so we'll let it slide ...
[ "void", "sendEvent", "(", "CallEvent", "call", ")", "throws", "NoConnectionsException", ",", "IOException", ",", "ProcCallException", "{", "if", "(", "call", ".", "endTS", "==", "null", ")", "{", "assert", "(", "call", ".", "startTS", "!=", "null", ")", ";...
Send a call event to either BeginCall or EndCall based on the event. @throws NoConnectionsException @throws IOException @throws ProcCallException
[ "Send", "a", "call", "event", "to", "either", "BeginCall", "or", "EndCall", "based", "on", "the", "event", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/CallCenterApp.java#L285-L298
60,603
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlByteArrayOutputStream.java
HsqlByteArrayOutputStream.write
public void write(char[] c, int off, int len) { ensureRoom(len * 2); for (int i = off; i < len; i++) { int v = c[i]; buffer[count++] = (byte) (v >>> 8); buffer[count++] = (byte) v; } }
java
public void write(char[] c, int off, int len) { ensureRoom(len * 2); for (int i = off; i < len; i++) { int v = c[i]; buffer[count++] = (byte) (v >>> 8); buffer[count++] = (byte) v; } }
[ "public", "void", "write", "(", "char", "[", "]", "c", ",", "int", "off", ",", "int", "len", ")", "{", "ensureRoom", "(", "len", "*", "2", ")", ";", "for", "(", "int", "i", "=", "off", ";", "i", "<", "len", ";", "i", "++", ")", "{", "int", ...
additional public methods not in similar java.util classes
[ "additional", "public", "methods", "not", "in", "similar", "java", ".", "util", "classes" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlByteArrayOutputStream.java#L282-L292
60,604
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/LoadMultipartitionTable.java
LoadMultipartitionTable.executeSQL
long executeSQL(boolean isFinal) throws VoltAbortException { long count = 0; VoltTable[] results = voltExecuteSQL(isFinal); for (VoltTable result : results) { long dmlUpdated = result.asScalarLong(); if (dmlUpdated == 0) { throw new VoltAbortException("Ins...
java
long executeSQL(boolean isFinal) throws VoltAbortException { long count = 0; VoltTable[] results = voltExecuteSQL(isFinal); for (VoltTable result : results) { long dmlUpdated = result.asScalarLong(); if (dmlUpdated == 0) { throw new VoltAbortException("Ins...
[ "long", "executeSQL", "(", "boolean", "isFinal", ")", "throws", "VoltAbortException", "{", "long", "count", "=", "0", ";", "VoltTable", "[", "]", "results", "=", "voltExecuteSQL", "(", "isFinal", ")", ";", "for", "(", "VoltTable", "result", ":", "results", ...
Execute a set of queued inserts. Ensure each insert successfully inserts one row. Throw exception if not. @return Count of rows inserted. @throws VoltAbortException if any failure at all.
[ "Execute", "a", "set", "of", "queued", "inserts", ".", "Ensure", "each", "insert", "successfully", "inserts", "one", "row", ".", "Throw", "exception", "if", "not", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/LoadMultipartitionTable.java#L260-L274
60,605
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java
WrapperInvocationHandler._isCloseSurrogateMethod
protected static boolean _isCloseSurrogateMethod(final Class clazz, final Method method) { return ((Connection.class.isAssignableFrom( clazz) || Statement.class.isAssignableFrom( clazz)) && "close".equals(method.getName())); }
java
protected static boolean _isCloseSurrogateMethod(final Class clazz, final Method method) { return ((Connection.class.isAssignableFrom( clazz) || Statement.class.isAssignableFrom( clazz)) && "close".equals(method.getName())); }
[ "protected", "static", "boolean", "_isCloseSurrogateMethod", "(", "final", "Class", "clazz", ",", "final", "Method", "method", ")", "{", "return", "(", "(", "Connection", ".", "class", ".", "isAssignableFrom", "(", "clazz", ")", "||", "Statement", ".", "class"...
Simple test used only during static initialization. @param clazz reflecting the given public member method @param method to test @return true if close() method of poolable class
[ "Simple", "test", "used", "only", "during", "static", "initialization", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java#L293-L299
60,606
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java
WrapperInvocationHandler._computeProxiedInterface
protected static Class[] _computeProxiedInterface(Object delegate) { // NOTE: Order is important for XXXStatement. if (delegate instanceof Array) { return arrayInterface; } else if (delegate instanceof Connection) { return connectionInterface; } else if (delegat...
java
protected static Class[] _computeProxiedInterface(Object delegate) { // NOTE: Order is important for XXXStatement. if (delegate instanceof Array) { return arrayInterface; } else if (delegate instanceof Connection) { return connectionInterface; } else if (delegat...
[ "protected", "static", "Class", "[", "]", "_computeProxiedInterface", "(", "Object", "delegate", ")", "{", "// NOTE: Order is important for XXXStatement.", "if", "(", "delegate", "instanceof", "Array", ")", "{", "return", "arrayInterface", ";", "}", "else", "if", "...
Given a delegate, retrieves the interface that must be implemented by a surrogate dynamic proxy to ensure pooling sensitive methods of the delegate are not exposed directly to clients. @param delegate the target delegate of interest @return the interface that must be implemented by a surrogate dynamic proxy to ensure ...
[ "Given", "a", "delegate", "retrieves", "the", "interface", "that", "must", "be", "implemented", "by", "a", "surrogate", "dynamic", "proxy", "to", "ensure", "pooling", "sensitive", "methods", "of", "the", "delegate", "are", "not", "exposed", "directly", "to", "...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java#L413-L433
60,607
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java
WrapperInvocationHandler.closeConnectionSurrogate
protected void closeConnectionSurrogate() throws Throwable { ConnectionPool connectionPool = this.connectionPool; if (connectionPool == null) { // CHECKME: policy? // pool has "disapeared" or was never provided (why?): should // "really" close the connection since ...
java
protected void closeConnectionSurrogate() throws Throwable { ConnectionPool connectionPool = this.connectionPool; if (connectionPool == null) { // CHECKME: policy? // pool has "disapeared" or was never provided (why?): should // "really" close the connection since ...
[ "protected", "void", "closeConnectionSurrogate", "(", ")", "throws", "Throwable", "{", "ConnectionPool", "connectionPool", "=", "this", ".", "connectionPool", ";", "if", "(", "connectionPool", "==", "null", ")", "{", "// CHECKME: policy?", "// pool has \"disapeared\" or...
Does work toward enabling reuse of the delegate, when it is a Connection. @throws java.lang.Throwable the exception, if any, thrown by returning the delegate connection to the ConnectionPool designated at construction of the connection's invocation handler.
[ "Does", "work", "toward", "enabling", "reuse", "of", "the", "delegate", "when", "it", "is", "a", "Connection", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java#L764-L784
60,608
VoltDB/voltdb
src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java
DRIDTrackerHelper.jsonifyClusterTrackers
public static String jsonifyClusterTrackers(Pair<Long, Long> lastConsumerUniqueIds, Map<Integer, Map<Integer, DRSiteDrIdTracker>> allProducerTrackers) throws JSONException { JSONStringer stringer = new JSONStringer(); stringer.object(); stringe...
java
public static String jsonifyClusterTrackers(Pair<Long, Long> lastConsumerUniqueIds, Map<Integer, Map<Integer, DRSiteDrIdTracker>> allProducerTrackers) throws JSONException { JSONStringer stringer = new JSONStringer(); stringer.object(); stringe...
[ "public", "static", "String", "jsonifyClusterTrackers", "(", "Pair", "<", "Long", ",", "Long", ">", "lastConsumerUniqueIds", ",", "Map", "<", "Integer", ",", "Map", "<", "Integer", ",", "DRSiteDrIdTracker", ">", ">", "allProducerTrackers", ")", "throws", "JSONEx...
Serialize the cluster trackers into JSON. @param lastConsumerUniqueIds UniqueIDs recorded on each consumer partition. @param allProducerTrackers All producer cluster trackers retrieved from each consumer partition. @return A JSON string containing all information in the parameters. @throws JSONException
[ "Serialize", "the", "cluster", "trackers", "into", "JSON", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java#L47-L68
60,609
VoltDB/voltdb
src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java
DRIDTrackerHelper.dejsonifyClusterTrackers
public static Map<Integer, Map<Integer, DRSiteDrIdTracker>> dejsonifyClusterTrackers(final String jsonData, boolean resetLastReceivedLogIds) throws JSONException { Map<Integer, Map<Integer, DRSiteDrIdTracker>> producerTrackers = new HashMap<>(); JSONObject clusterData = new JSONObject(jsonData)...
java
public static Map<Integer, Map<Integer, DRSiteDrIdTracker>> dejsonifyClusterTrackers(final String jsonData, boolean resetLastReceivedLogIds) throws JSONException { Map<Integer, Map<Integer, DRSiteDrIdTracker>> producerTrackers = new HashMap<>(); JSONObject clusterData = new JSONObject(jsonData)...
[ "public", "static", "Map", "<", "Integer", ",", "Map", "<", "Integer", ",", "DRSiteDrIdTracker", ">", ">", "dejsonifyClusterTrackers", "(", "final", "String", "jsonData", ",", "boolean", "resetLastReceivedLogIds", ")", "throws", "JSONException", "{", "Map", "<", ...
Deserialize the trackers retrieved from each consumer partitions. @param jsonData Tracker data retrieved from each consumer partition. @param partitionsMissingTracker @return A map of producer cluster ID to tracker for each producer partition. If no tracker information is found, the map will be empty. @throws JSONExce...
[ "Deserialize", "the", "trackers", "retrieved", "from", "each", "consumer", "partitions", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java#L79-L104
60,610
VoltDB/voltdb
src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java
DRIDTrackerHelper.mergeTrackers
public static void mergeTrackers(Map<Integer, Map<Integer, DRSiteDrIdTracker>> base, Map<Integer, Map<Integer, DRSiteDrIdTracker>> add) { for (Map.Entry<Integer, Map<Integer, DRSiteDrIdTracker>> clusterEntry : add.entrySet()) { final Map<Integer, DRSiteDrIdTr...
java
public static void mergeTrackers(Map<Integer, Map<Integer, DRSiteDrIdTracker>> base, Map<Integer, Map<Integer, DRSiteDrIdTracker>> add) { for (Map.Entry<Integer, Map<Integer, DRSiteDrIdTracker>> clusterEntry : add.entrySet()) { final Map<Integer, DRSiteDrIdTr...
[ "public", "static", "void", "mergeTrackers", "(", "Map", "<", "Integer", ",", "Map", "<", "Integer", ",", "DRSiteDrIdTracker", ">", ">", "base", ",", "Map", "<", "Integer", ",", "Map", "<", "Integer", ",", "DRSiteDrIdTracker", ">", ">", "add", ")", "{", ...
Merge trackers in the additional map into the base map. @param base The base map to merge trackers into. @param add The additional trackers to merge.
[ "Merge", "trackers", "in", "the", "additional", "map", "into", "the", "base", "map", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java#L111-L129
60,611
VoltDB/voltdb
third_party/java/src/org/json_voltpatches/JSONWriter.java
JSONWriter.array
public JSONWriter array(Iterable<? extends JSONString> iter) throws JSONException { array(); for (JSONString element : iter) { value(element); } endArray(); return this; }
java
public JSONWriter array(Iterable<? extends JSONString> iter) throws JSONException { array(); for (JSONString element : iter) { value(element); } endArray(); return this; }
[ "public", "JSONWriter", "array", "(", "Iterable", "<", "?", "extends", "JSONString", ">", "iter", ")", "throws", "JSONException", "{", "array", "(", ")", ";", "for", "(", "JSONString", "element", ":", "iter", ")", "{", "value", "(", "element", ")", ";", ...
Append an array value based on a custom JSONString implementation. @param jss The JSONString array or container to append. Its elements can be null or implement JSONString. @return this @throws JSONException if the value is out of sequence or if a toJSONString method throws an Exception or if the writer throws an IOExc...
[ "Append", "an", "array", "value", "based", "on", "a", "custom", "JSONString", "implementation", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/json_voltpatches/JSONWriter.java#L453-L460
60,612
VoltDB/voltdb
third_party/java/src/org/json_voltpatches/JSONWriter.java
JSONWriter.keySymbolValuePair
public JSONWriter keySymbolValuePair(String aKey, String aValue) throws JSONException { assert(aKey != null); assert(m_mode == 'k'); // The key should not have already been seen in this scope. assert(m_scopeStack[m_top].add(aKey)); try { m_writer.write(m_...
java
public JSONWriter keySymbolValuePair(String aKey, String aValue) throws JSONException { assert(aKey != null); assert(m_mode == 'k'); // The key should not have already been seen in this scope. assert(m_scopeStack[m_top].add(aKey)); try { m_writer.write(m_...
[ "public", "JSONWriter", "keySymbolValuePair", "(", "String", "aKey", ",", "String", "aValue", ")", "throws", "JSONException", "{", "assert", "(", "aKey", "!=", "null", ")", ";", "assert", "(", "m_mode", "==", "'", "'", ")", ";", "// The key should not have alr...
Write a JSON key-value pair in one optimized step that assumes that the key is a symbol composed of normal characters requiring no escaping and asserts that keys are non-null and unique within an object ONLY if asserts are enabled. This method is most suitable in the common case where the caller is making a hard-coded ...
[ "Write", "a", "JSON", "key", "-", "value", "pair", "in", "one", "optimized", "step", "that", "assumes", "that", "the", "key", "is", "a", "symbol", "composed", "of", "normal", "characters", "requiring", "no", "escaping", "and", "asserts", "that", "keys", "a...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/json_voltpatches/JSONWriter.java#L475-L499
60,613
VoltDB/voltdb
src/frontend/org/voltdb/client/HashinatorLite.java
HashinatorLite.gunzipBytes
public static byte[] gunzipBytes(byte[] compressedBytes) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream((int)(compressedBytes.length * 1.5)); InflaterOutputStream dos = new InflaterOutputStream(bos); dos.write(compressedBytes); dos.close(); return ...
java
public static byte[] gunzipBytes(byte[] compressedBytes) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream((int)(compressedBytes.length * 1.5)); InflaterOutputStream dos = new InflaterOutputStream(bos); dos.write(compressedBytes); dos.close(); return ...
[ "public", "static", "byte", "[", "]", "gunzipBytes", "(", "byte", "[", "]", "compressedBytes", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "bos", "=", "new", "ByteArrayOutputStream", "(", "(", "int", ")", "(", "compressedBytes", ".", "length", ...
to avoid linking all that jazz into the client code
[ "to", "avoid", "linking", "all", "that", "jazz", "into", "the", "client", "code" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/HashinatorLite.java#L276-L283
60,614
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorData.java
RowSetNavigatorData.getGroupData
public Object[] getGroupData(Object[] data) { if (isSimpleAggregate) { if (simpleAggregateData == null) { simpleAggregateData = data; return null; } return simpleAggregateData; } RowIterator it = groupIndex.findFirstRow(sess...
java
public Object[] getGroupData(Object[] data) { if (isSimpleAggregate) { if (simpleAggregateData == null) { simpleAggregateData = data; return null; } return simpleAggregateData; } RowIterator it = groupIndex.findFirstRow(sess...
[ "public", "Object", "[", "]", "getGroupData", "(", "Object", "[", "]", "data", ")", "{", "if", "(", "isSimpleAggregate", ")", "{", "if", "(", "simpleAggregateData", "==", "null", ")", "{", "simpleAggregateData", "=", "data", ";", "return", "null", ";", "...
Special case for isSimpleAggregate cannot use index lookup.
[ "Special", "case", "for", "isSimpleAggregate", "cannot", "use", "index", "lookup", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorData.java#L570-L595
60,615
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.addConstraint
public void addConstraint(Constraint c) { int index = c.getConstraintType() == Constraint.PRIMARY_KEY ? 0 : constraintList .length; constraintList = (...
java
public void addConstraint(Constraint c) { int index = c.getConstraintType() == Constraint.PRIMARY_KEY ? 0 : constraintList .length; constraintList = (...
[ "public", "void", "addConstraint", "(", "Constraint", "c", ")", "{", "int", "index", "=", "c", ".", "getConstraintType", "(", ")", "==", "Constraint", ".", "PRIMARY_KEY", "?", "0", ":", "constraintList", ".", "length", ";", "constraintList", "=", "(", "Con...
Adds a constraint.
[ "Adds", "a", "constraint", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L620-L631
60,616
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getUniqueConstraintForColumns
Constraint getUniqueConstraintForColumns(int[] cols) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.isUniqueWithColumns(cols)) { return c; } } return null; }
java
Constraint getUniqueConstraintForColumns(int[] cols) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.isUniqueWithColumns(cols)) { return c; } } return null; }
[ "Constraint", "getUniqueConstraintForColumns", "(", "int", "[", "]", "cols", ")", "{", "for", "(", "int", "i", "=", "0", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", "size", ";", "i", "++", ")", "{", "Constraint", "c", "=", "cons...
Returns the UNIQUE or PK constraint with the given column signature.
[ "Returns", "the", "UNIQUE", "or", "PK", "constraint", "with", "the", "given", "column", "signature", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L789-L800
60,617
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getUniqueConstraintForColumns
Constraint getUniqueConstraintForColumns(int[] mainTableCols, int[] refTableCols) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; // A VoltDB extension -- Don't consider non-column expression indexes for this purpose ...
java
Constraint getUniqueConstraintForColumns(int[] mainTableCols, int[] refTableCols) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; // A VoltDB extension -- Don't consider non-column expression indexes for this purpose ...
[ "Constraint", "getUniqueConstraintForColumns", "(", "int", "[", "]", "mainTableCols", ",", "int", "[", "]", "refTableCols", ")", "{", "for", "(", "int", "i", "=", "0", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", "size", ";", "i", ...
Returns the UNIQUE or PK constraint with the given column signature. Modifies the composition of refTableCols if necessary.
[ "Returns", "the", "UNIQUE", "or", "PK", "constraint", "with", "the", "given", "column", "signature", ".", "Modifies", "the", "composition", "of", "refTableCols", "if", "necessary", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L806-L851
60,618
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getFKConstraintForColumns
Constraint getFKConstraintForColumns(Table tableMain, int[] mainCols, int[] refCols) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.isEquivalent(tableMain, mainCols, this, refCols)) { ...
java
Constraint getFKConstraintForColumns(Table tableMain, int[] mainCols, int[] refCols) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.isEquivalent(tableMain, mainCols, this, refCols)) { ...
[ "Constraint", "getFKConstraintForColumns", "(", "Table", "tableMain", ",", "int", "[", "]", "mainCols", ",", "int", "[", "]", "refCols", ")", "{", "for", "(", "int", "i", "=", "0", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", "size...
Returns any foreign key constraint equivalent to the column sets
[ "Returns", "any", "foreign", "key", "constraint", "equivalent", "to", "the", "column", "sets" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L856-L868
60,619
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getUniqueOrPKConstraintForIndex
public Constraint getUniqueOrPKConstraintForIndex(Index index) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getMainIndex() == index && (c.getConstraintType() == Constraint.UNIQUE || ...
java
public Constraint getUniqueOrPKConstraintForIndex(Index index) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getMainIndex() == index && (c.getConstraintType() == Constraint.UNIQUE || ...
[ "public", "Constraint", "getUniqueOrPKConstraintForIndex", "(", "Index", "index", ")", "{", "for", "(", "int", "i", "=", "0", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", "size", ";", "i", "++", ")", "{", "Constraint", "c", "=", "c...
Returns any unique Constraint using this index @param index
[ "Returns", "any", "unique", "Constraint", "using", "this", "index" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L875-L888
60,620
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getNextConstraintIndex
int getNextConstraintIndex(int from, int type) { for (int i = from, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getConstraintType() == type) { return i; } } return -1; }
java
int getNextConstraintIndex(int from, int type) { for (int i = from, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getConstraintType() == type) { return i; } } return -1; }
[ "int", "getNextConstraintIndex", "(", "int", "from", ",", "int", "type", ")", "{", "for", "(", "int", "i", "=", "from", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", "size", ";", "i", "++", ")", "{", "Constraint", "c", "=", "con...
Returns the next constraint of a given type @param from @param type
[ "Returns", "the", "next", "constraint", "of", "a", "given", "type" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L896-L907
60,621
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.addColumn
public void addColumn(ColumnSchema column) { String name = column.getName().name; if (findColumn(name) >= 0) { throw Error.error(ErrorCode.X_42504, name); } if (column.isIdentity()) { if (identityColumn != -1) { throw Error.error(ErrorCode.X_425...
java
public void addColumn(ColumnSchema column) { String name = column.getName().name; if (findColumn(name) >= 0) { throw Error.error(ErrorCode.X_42504, name); } if (column.isIdentity()) { if (identityColumn != -1) { throw Error.error(ErrorCode.X_425...
[ "public", "void", "addColumn", "(", "ColumnSchema", "column", ")", "{", "String", "name", "=", "column", ".", "getName", "(", ")", ".", "name", ";", "if", "(", "findColumn", "(", "name", ")", ">=", "0", ")", "{", "throw", "Error", ".", "error", "(", ...
Performs the table level checks and adds a column to the table at the DDL level. Only used at table creation, not at alter column.
[ "Performs", "the", "table", "level", "checks", "and", "adds", "a", "column", "to", "the", "table", "at", "the", "DDL", "level", ".", "Only", "used", "at", "table", "creation", "not", "at", "alter", "column", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L913-L931
60,622
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.checkColumnsMatch
void checkColumnsMatch(int[] col, Table other, int[] othercol) { for (int i = 0; i < col.length; i++) { Type type = colTypes[col[i]]; Type otherType = other.colTypes[othercol[i]]; if (type.typeComparisonGroup != otherType.typeComparisonGroup) { throw Er...
java
void checkColumnsMatch(int[] col, Table other, int[] othercol) { for (int i = 0; i < col.length; i++) { Type type = colTypes[col[i]]; Type otherType = other.colTypes[othercol[i]]; if (type.typeComparisonGroup != otherType.typeComparisonGroup) { throw Er...
[ "void", "checkColumnsMatch", "(", "int", "[", "]", "col", ",", "Table", "other", ",", "int", "[", "]", "othercol", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "col", ".", "length", ";", "i", "++", ")", "{", "Type", "type", "=", ...
Match two valid, equal length, columns arrays for type of columns @param col column array from this Table @param other the other Table object @param othercol column array from the other Table
[ "Match", "two", "valid", "equal", "length", "columns", "arrays", "for", "type", "of", "columns" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L963-L973
60,623
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getDependentConstraints
OrderedHashSet getDependentConstraints(int colIndex) { OrderedHashSet set = new OrderedHashSet(); for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.hasColumnOnly(colIndex)) { set.add(c); } ...
java
OrderedHashSet getDependentConstraints(int colIndex) { OrderedHashSet set = new OrderedHashSet(); for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.hasColumnOnly(colIndex)) { set.add(c); } ...
[ "OrderedHashSet", "getDependentConstraints", "(", "int", "colIndex", ")", "{", "OrderedHashSet", "set", "=", "new", "OrderedHashSet", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", "size",...
Returns list of constraints dependent only on one column
[ "Returns", "list", "of", "constraints", "dependent", "only", "on", "one", "column" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1160-L1173
60,624
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getContainingConstraints
OrderedHashSet getContainingConstraints(int colIndex) { OrderedHashSet set = new OrderedHashSet(); for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.hasColumnPlus(colIndex)) { set.add(c); } ...
java
OrderedHashSet getContainingConstraints(int colIndex) { OrderedHashSet set = new OrderedHashSet(); for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.hasColumnPlus(colIndex)) { set.add(c); } ...
[ "OrderedHashSet", "getContainingConstraints", "(", "int", "colIndex", ")", "{", "OrderedHashSet", "set", "=", "new", "OrderedHashSet", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", "size"...
Returns list of constraints dependent on more than one column
[ "Returns", "list", "of", "constraints", "dependent", "on", "more", "than", "one", "column" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1178-L1191
60,625
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getDependentConstraints
OrderedHashSet getDependentConstraints(Constraint constraint) { OrderedHashSet set = new OrderedHashSet(); for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getConstraintType() == Constraint.MAIN) { if (c.cor...
java
OrderedHashSet getDependentConstraints(Constraint constraint) { OrderedHashSet set = new OrderedHashSet(); for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getConstraintType() == Constraint.MAIN) { if (c.cor...
[ "OrderedHashSet", "getDependentConstraints", "(", "Constraint", "constraint", ")", "{", "OrderedHashSet", "set", "=", "new", "OrderedHashSet", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", ...
Returns list of MAIN constraints dependent on this PK or UNIQUE constraint
[ "Returns", "list", "of", "MAIN", "constraints", "dependent", "on", "this", "PK", "or", "UNIQUE", "constraint" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1211-L1226
60,626
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.checkColumnInFKConstraint
void checkColumnInFKConstraint(int colIndex, int actionType) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getConstraintType() == Constraint.FOREIGN_KEY && c.hasColumn(colIndex) && (actio...
java
void checkColumnInFKConstraint(int colIndex, int actionType) { for (int i = 0, size = constraintList.length; i < size; i++) { Constraint c = constraintList[i]; if (c.getConstraintType() == Constraint.FOREIGN_KEY && c.hasColumn(colIndex) && (actio...
[ "void", "checkColumnInFKConstraint", "(", "int", "colIndex", ",", "int", "actionType", ")", "{", "for", "(", "int", "i", "=", "0", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", "size", ";", "i", "++", ")", "{", "Constraint", "c", ...
Used for column defaults and nullability. Checks whether column is in an FK with a given referential action type. @param colIndex index of column @param actionType referential action of the FK
[ "Used", "for", "column", "defaults", "and", "nullability", ".", "Checks", "whether", "column", "is", "in", "an", "FK", "with", "a", "given", "referential", "action", "type", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1253-L1268
60,627
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getColumnIndex
public int getColumnIndex(String name) { int i = findColumn(name); if (i == -1) { throw Error.error(ErrorCode.X_42501, name); } return i; }
java
public int getColumnIndex(String name) { int i = findColumn(name); if (i == -1) { throw Error.error(ErrorCode.X_42501, name); } return i; }
[ "public", "int", "getColumnIndex", "(", "String", "name", ")", "{", "int", "i", "=", "findColumn", "(", "name", ")", ";", "if", "(", "i", "==", "-", "1", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", "X_42501", ",", "name", ")", ...
Returns the index of given column name or throws if not found
[ "Returns", "the", "index", "of", "given", "column", "name", "or", "throws", "if", "not", "found" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1280-L1289
60,628
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.setDefaultExpression
void setDefaultExpression(int columnIndex, Expression def) { ColumnSchema column = getColumn(columnIndex); column.setDefaultExpression(def); setColumnTypeVars(columnIndex); }
java
void setDefaultExpression(int columnIndex, Expression def) { ColumnSchema column = getColumn(columnIndex); column.setDefaultExpression(def); setColumnTypeVars(columnIndex); }
[ "void", "setDefaultExpression", "(", "int", "columnIndex", ",", "Expression", "def", ")", "{", "ColumnSchema", "column", "=", "getColumn", "(", "columnIndex", ")", ";", "column", ".", "setDefaultExpression", "(", "def", ")", ";", "setColumnTypeVars", "(", "colum...
Sets the SQL default value for a columm.
[ "Sets", "the", "SQL", "default", "value", "for", "a", "columm", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1304-L1310
60,629
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.resetDefaultsFlag
void resetDefaultsFlag() { hasDefaultValues = false; for (int i = 0; i < colDefaults.length; i++) { hasDefaultValues = hasDefaultValues || colDefaults[i] != null; } }
java
void resetDefaultsFlag() { hasDefaultValues = false; for (int i = 0; i < colDefaults.length; i++) { hasDefaultValues = hasDefaultValues || colDefaults[i] != null; } }
[ "void", "resetDefaultsFlag", "(", ")", "{", "hasDefaultValues", "=", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "colDefaults", ".", "length", ";", "i", "++", ")", "{", "hasDefaultValues", "=", "hasDefaultValues", "||", "colDefaults", ...
sets the flag for the presence of any default expression
[ "sets", "the", "flag", "for", "the", "presence", "of", "any", "default", "expression" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1315-L1322
60,630
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getIndexForColumn
Index getIndexForColumn(int col) { int i = bestIndexForColumn[col]; return i == -1 ? null : this.indexList[i]; }
java
Index getIndexForColumn(int col) { int i = bestIndexForColumn[col]; return i == -1 ? null : this.indexList[i]; }
[ "Index", "getIndexForColumn", "(", "int", "col", ")", "{", "int", "i", "=", "bestIndexForColumn", "[", "col", "]", ";", "return", "i", "==", "-", "1", "?", "null", ":", "this", ".", "indexList", "[", "i", "]", ";", "}" ]
Finds an existing index for a column
[ "Finds", "an", "existing", "index", "for", "a", "column" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1335-L1341
60,631
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.createPrimaryKey
public void createPrimaryKey(HsqlName indexName, int[] columns, boolean columnsNotNull) { if (primaryKeyCols != null) { throw Error.runtimeError(ErrorCode.U_S0500, "Table"); } if (columns == null) { columns = ValuePool.emptyIntArray; ...
java
public void createPrimaryKey(HsqlName indexName, int[] columns, boolean columnsNotNull) { if (primaryKeyCols != null) { throw Error.runtimeError(ErrorCode.U_S0500, "Table"); } if (columns == null) { columns = ValuePool.emptyIntArray; ...
[ "public", "void", "createPrimaryKey", "(", "HsqlName", "indexName", ",", "int", "[", "]", "columns", ",", "boolean", "columnsNotNull", ")", "{", "if", "(", "primaryKeyCols", "!=", "null", ")", "{", "throw", "Error", ".", "runtimeError", "(", "ErrorCode", "."...
Creates a single or multi-column primary key and index. sets the colTypes array. Finalises the creation of the table. (fredt@users)
[ "Creates", "a", "single", "or", "multi", "-", "column", "primary", "key", "and", "index", ".", "sets", "the", "colTypes", "array", ".", "Finalises", "the", "creation", "of", "the", "table", ".", "(", "fredt" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1396-L1432
60,632
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.addTrigger
void addTrigger(TriggerDef td, HsqlName otherName) { int index = triggerList.length; if (otherName != null) { int pos = getTriggerIndex(otherName.name); if (pos != -1) { index = pos + 1; } } triggerList = (TriggerDef[]) ArrayUtil.to...
java
void addTrigger(TriggerDef td, HsqlName otherName) { int index = triggerList.length; if (otherName != null) { int pos = getTriggerIndex(otherName.name); if (pos != -1) { index = pos + 1; } } triggerList = (TriggerDef[]) ArrayUtil.to...
[ "void", "addTrigger", "(", "TriggerDef", "td", ",", "HsqlName", "otherName", ")", "{", "int", "index", "=", "triggerList", ".", "length", ";", "if", "(", "otherName", "!=", "null", ")", "{", "int", "pos", "=", "getTriggerIndex", "(", "otherName", ".", "n...
Adds a trigger.
[ "Adds", "a", "trigger", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1601-L1634
60,633
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getTrigger
TriggerDef getTrigger(String name) { for (int i = triggerList.length - 1; i >= 0; i--) { if (triggerList[i].name.name.equals(name)) { return triggerList[i]; } } return null; }
java
TriggerDef getTrigger(String name) { for (int i = triggerList.length - 1; i >= 0; i--) { if (triggerList[i].name.name.equals(name)) { return triggerList[i]; } } return null; }
[ "TriggerDef", "getTrigger", "(", "String", "name", ")", "{", "for", "(", "int", "i", "=", "triggerList", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "if", "(", "triggerList", "[", "i", "]", ".", "name", ".", "name", ...
Returns a trigger.
[ "Returns", "a", "trigger", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1639-L1648
60,634
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.removeTrigger
void removeTrigger(String name) { TriggerDef td = null; for (int i = 0; i < triggerList.length; i++) { td = triggerList[i]; if (td.name.name.equals(name)) { td.terminate(); triggerList = (TriggerDef[]) ArrayUtil.toAdjustedAr...
java
void removeTrigger(String name) { TriggerDef td = null; for (int i = 0; i < triggerList.length; i++) { td = triggerList[i]; if (td.name.name.equals(name)) { td.terminate(); triggerList = (TriggerDef[]) ArrayUtil.toAdjustedAr...
[ "void", "removeTrigger", "(", "String", "name", ")", "{", "TriggerDef", "td", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "triggerList", ".", "length", ";", "i", "++", ")", "{", "td", "=", "triggerList", "[", "i", "]", ";",...
Drops a trigger.
[ "Drops", "a", "trigger", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1664-L1701
60,635
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.releaseTriggers
void releaseTriggers() { // look in each trigger list of each type of trigger for (int i = 0; i < TriggerDef.NUM_TRIGS; i++) { for (int j = 0; j < triggerLists[i].length; j++) { triggerLists[i][j].terminate(); } triggerLists[i] = TriggerDef.emptyArra...
java
void releaseTriggers() { // look in each trigger list of each type of trigger for (int i = 0; i < TriggerDef.NUM_TRIGS; i++) { for (int j = 0; j < triggerLists[i].length; j++) { triggerLists[i][j].terminate(); } triggerLists[i] = TriggerDef.emptyArra...
[ "void", "releaseTriggers", "(", ")", "{", "// look in each trigger list of each type of trigger", "for", "(", "int", "i", "=", "0", ";", "i", "<", "TriggerDef", ".", "NUM_TRIGS", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<", ...
Drops all triggers.
[ "Drops", "all", "triggers", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1706-L1716
60,636
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getIndexIndex
int getIndexIndex(String indexName) { Index[] indexes = indexList; for (int i = 0; i < indexes.length; i++) { if (indexName.equals(indexes[i].getName().name)) { return i; } } // no such index return -1; }
java
int getIndexIndex(String indexName) { Index[] indexes = indexList; for (int i = 0; i < indexes.length; i++) { if (indexName.equals(indexes[i].getName().name)) { return i; } } // no such index return -1; }
[ "int", "getIndexIndex", "(", "String", "indexName", ")", "{", "Index", "[", "]", "indexes", "=", "indexList", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "indexes", ".", "length", ";", "i", "++", ")", "{", "if", "(", "indexName", ".", "...
Returns the index of the Index object of the given name or -1 if not found.
[ "Returns", "the", "index", "of", "the", "Index", "object", "of", "the", "given", "name", "or", "-", "1", "if", "not", "found", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1721-L1733
60,637
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getIndex
Index getIndex(String indexName) { Index[] indexes = indexList; int i = getIndexIndex(indexName); return i == -1 ? null : indexes[i]; }
java
Index getIndex(String indexName) { Index[] indexes = indexList; int i = getIndexIndex(indexName); return i == -1 ? null : indexes[i]; }
[ "Index", "getIndex", "(", "String", "indexName", ")", "{", "Index", "[", "]", "indexes", "=", "indexList", ";", "int", "i", "=", "getIndexIndex", "(", "indexName", ")", ";", "return", "i", "==", "-", "1", "?", "null", ":", "indexes", "[", "i", "]", ...
Returns the Index object of the given name or null if not found.
[ "Returns", "the", "Index", "object", "of", "the", "given", "name", "or", "null", "if", "not", "found", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1738-L1745
60,638
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getConstraintIndex
int getConstraintIndex(String constraintName) { for (int i = 0, size = constraintList.length; i < size; i++) { if (constraintList[i].getName().name.equals(constraintName)) { return i; } } return -1; }
java
int getConstraintIndex(String constraintName) { for (int i = 0, size = constraintList.length; i < size; i++) { if (constraintList[i].getName().name.equals(constraintName)) { return i; } } return -1; }
[ "int", "getConstraintIndex", "(", "String", "constraintName", ")", "{", "for", "(", "int", "i", "=", "0", ",", "size", "=", "constraintList", ".", "length", ";", "i", "<", "size", ";", "i", "++", ")", "{", "if", "(", "constraintList", "[", "i", "]", ...
Return the position of the constraint within the list
[ "Return", "the", "position", "of", "the", "constraint", "within", "the", "list" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1750-L1759
60,639
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getConstraint
public Constraint getConstraint(String constraintName) { int i = getConstraintIndex(constraintName); return (i < 0) ? null : constraintList[i]; }
java
public Constraint getConstraint(String constraintName) { int i = getConstraintIndex(constraintName); return (i < 0) ? null : constraintList[i]; }
[ "public", "Constraint", "getConstraint", "(", "String", "constraintName", ")", "{", "int", "i", "=", "getConstraintIndex", "(", "constraintName", ")", ";", "return", "(", "i", "<", "0", ")", "?", "null", ":", "constraintList", "[", "i", "]", ";", "}" ]
return the named constriant
[ "return", "the", "named", "constriant" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1764-L1770
60,640
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.createIndexForColumns
Index createIndexForColumns(int[] columns) { HsqlName indexName = database.nameManager.newAutoName("IDX_T", getSchemaName(), getName(), SchemaObject.INDEX); try { Index index = createAndAddIndexStructure(indexName, columns, null, null, false, false, false, false...
java
Index createIndexForColumns(int[] columns) { HsqlName indexName = database.nameManager.newAutoName("IDX_T", getSchemaName(), getName(), SchemaObject.INDEX); try { Index index = createAndAddIndexStructure(indexName, columns, null, null, false, false, false, false...
[ "Index", "createIndexForColumns", "(", "int", "[", "]", "columns", ")", "{", "HsqlName", "indexName", "=", "database", ".", "nameManager", ".", "newAutoName", "(", "\"IDX_T\"", ",", "getSchemaName", "(", ")", ",", "getName", "(", ")", ",", "SchemaObject", "....
Used to create an index automatically for system tables.
[ "Used", "to", "create", "an", "index", "automatically", "for", "system", "tables", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1845-L1858
60,641
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.enforceRowConstraints
void enforceRowConstraints(Session session, Object[] data) { for (int i = 0; i < defaultColumnMap.length; i++) { Type type = colTypes[i]; data[i] = type.convertToTypeLimits(session, data[i]); if (type.isDomainType()) { Constraint[] constraints = ...
java
void enforceRowConstraints(Session session, Object[] data) { for (int i = 0; i < defaultColumnMap.length; i++) { Type type = colTypes[i]; data[i] = type.convertToTypeLimits(session, data[i]); if (type.isDomainType()) { Constraint[] constraints = ...
[ "void", "enforceRowConstraints", "(", "Session", "session", ",", "Object", "[", "]", "data", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "defaultColumnMap", ".", "length", ";", "i", "++", ")", "{", "Type", "type", "=", "colTypes", "[",...
Enforce max field sizes according to SQL column definition. SQL92 13.8
[ "Enforce", "max", "field", "sizes", "according", "to", "SQL", "column", "definition", ".", "SQL92", "13", ".", "8" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1960-L1996
60,642
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getIndexForColumns
Index getIndexForColumns(int[] cols) { int i = bestIndexForColumn[cols[0]]; if (i > -1) { return indexList[i]; } switch (tableType) { case TableBase.SYSTEM_SUBQUERY : case TableBase.SYSTEM_TABLE : case TableBase.VIEW_TABLE : ...
java
Index getIndexForColumns(int[] cols) { int i = bestIndexForColumn[cols[0]]; if (i > -1) { return indexList[i]; } switch (tableType) { case TableBase.SYSTEM_SUBQUERY : case TableBase.SYSTEM_TABLE : case TableBase.VIEW_TABLE : ...
[ "Index", "getIndexForColumns", "(", "int", "[", "]", "cols", ")", "{", "int", "i", "=", "bestIndexForColumn", "[", "cols", "[", "0", "]", "]", ";", "if", "(", "i", ">", "-", "1", ")", "{", "return", "indexList", "[", "i", "]", ";", "}", "switch",...
Finds an existing index for a column group
[ "Finds", "an", "existing", "index", "for", "a", "column", "group" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2001-L2022
60,643
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getIndexForColumns
Index getIndexForColumns(OrderedIntHashSet set) { int maxMatchCount = 0; Index selected = null; if (set.isEmpty()) { return null; } for (int i = 0, count = indexList.length; i < count; i++) { Index currentindex = getIndex(i); int[] in...
java
Index getIndexForColumns(OrderedIntHashSet set) { int maxMatchCount = 0; Index selected = null; if (set.isEmpty()) { return null; } for (int i = 0, count = indexList.length; i < count; i++) { Index currentindex = getIndex(i); int[] in...
[ "Index", "getIndexForColumns", "(", "OrderedIntHashSet", "set", ")", "{", "int", "maxMatchCount", "=", "0", ";", "Index", "selected", "=", "null", ";", "if", "(", "set", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", "for", "(", "int",...
Finds an existing index for a column set or create one for temporary tables
[ "Finds", "an", "existing", "index", "for", "a", "column", "set", "or", "create", "one", "for", "temporary", "tables" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2028-L2071
60,644
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.getIndexRootsArray
public final int[] getIndexRootsArray() { PersistentStore store = database.persistentStoreCollection.getStore(this); int[] roots = new int[getIndexCount()]; for (int i = 0; i < getIndexCount(); i++) { CachedObject accessor = store.getAccessor(indexList[i]); ...
java
public final int[] getIndexRootsArray() { PersistentStore store = database.persistentStoreCollection.getStore(this); int[] roots = new int[getIndexCount()]; for (int i = 0; i < getIndexCount(); i++) { CachedObject accessor = store.getAccessor(indexList[i]); ...
[ "public", "final", "int", "[", "]", "getIndexRootsArray", "(", ")", "{", "PersistentStore", "store", "=", "database", ".", "persistentStoreCollection", ".", "getStore", "(", "this", ")", ";", "int", "[", "]", "roots", "=", "new", "int", "[", "getIndexCount",...
Return the list of file pointers to root nodes for this table's indexes.
[ "Return", "the", "list", "of", "file", "pointers", "to", "root", "nodes", "for", "this", "table", "s", "indexes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2077-L2091
60,645
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.setIndexRoots
void setIndexRoots(Session session, String s) { if (!isCached) { throw Error.error(ErrorCode.X_42501, tableName.name); } ParserDQL p = new ParserDQL(session, new Scanner(s)); int[] roots = new int[getIndexCount()]; p.read(); for (int i = 0; i < get...
java
void setIndexRoots(Session session, String s) { if (!isCached) { throw Error.error(ErrorCode.X_42501, tableName.name); } ParserDQL p = new ParserDQL(session, new Scanner(s)); int[] roots = new int[getIndexCount()]; p.read(); for (int i = 0; i < get...
[ "void", "setIndexRoots", "(", "Session", "session", ",", "String", "s", ")", "{", "if", "(", "!", "isCached", ")", "{", "throw", "Error", ".", "error", "(", "ErrorCode", ".", "X_42501", ",", "tableName", ".", "name", ")", ";", "}", "ParserDQL", "p", ...
Sets the index roots and next identity.
[ "Sets", "the", "index", "roots", "and", "next", "identity", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2134-L2152
60,646
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.dropIndex
public void dropIndex(Session session, String indexname) { // find the array index for indexname and remove int todrop = getIndexIndex(indexname); indexList = (Index[]) ArrayUtil.toAdjustedArray(indexList, null, todrop, -1); for (int i = 0; i < indexList.length; i++) {...
java
public void dropIndex(Session session, String indexname) { // find the array index for indexname and remove int todrop = getIndexIndex(indexname); indexList = (Index[]) ArrayUtil.toAdjustedArray(indexList, null, todrop, -1); for (int i = 0; i < indexList.length; i++) {...
[ "public", "void", "dropIndex", "(", "Session", "session", ",", "String", "indexname", ")", "{", "// find the array index for indexname and remove", "int", "todrop", "=", "getIndexIndex", "(", "indexname", ")", ";", "indexList", "=", "(", "Index", "[", "]", ")", ...
Performs Table structure modification and changes to the index nodes to remove a given index from a MEMORY or TEXT table. Not for PK index.
[ "Performs", "Table", "structure", "modification", "and", "changes", "to", "the", "index", "nodes", "to", "remove", "a", "given", "index", "from", "a", "MEMORY", "or", "TEXT", "table", ".", "Not", "for", "PK", "index", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2159-L2176
60,647
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertRow
void insertRow(Session session, PersistentStore store, Object[] data) { setIdentityColumn(session, data); if (triggerLists[Trigger.INSERT_BEFORE].length != 0) { fireBeforeTriggers(session, Trigger.INSERT_BEFORE, null, data, null); } if (isVie...
java
void insertRow(Session session, PersistentStore store, Object[] data) { setIdentityColumn(session, data); if (triggerLists[Trigger.INSERT_BEFORE].length != 0) { fireBeforeTriggers(session, Trigger.INSERT_BEFORE, null, data, null); } if (isVie...
[ "void", "insertRow", "(", "Session", "session", ",", "PersistentStore", "store", ",", "Object", "[", "]", "data", ")", "{", "setIdentityColumn", "(", "session", ",", "data", ")", ";", "if", "(", "triggerLists", "[", "Trigger", ".", "INSERT_BEFORE", "]", "....
Mid level method for inserting rows. Performs constraint checks and fires row level triggers.
[ "Mid", "level", "method", "for", "inserting", "rows", ".", "Performs", "constraint", "checks", "and", "fires", "row", "level", "triggers", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2241-L2256
60,648
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertIntoTable
void insertIntoTable(Session session, Result result) { PersistentStore store = session.sessionData.getRowStore(this); RowSetNavigator nav = result.initialiseNavigator(); while (nav.hasNext()) { Object[] data = nav.getNext(); Object[] newData = (Object[...
java
void insertIntoTable(Session session, Result result) { PersistentStore store = session.sessionData.getRowStore(this); RowSetNavigator nav = result.initialiseNavigator(); while (nav.hasNext()) { Object[] data = nav.getNext(); Object[] newData = (Object[...
[ "void", "insertIntoTable", "(", "Session", "session", ",", "Result", "result", ")", "{", "PersistentStore", "store", "=", "session", ".", "sessionData", ".", "getRowStore", "(", "this", ")", ";", "RowSetNavigator", "nav", "=", "result", ".", "initialiseNavigator...
Multi-row insert method. Used for CREATE TABLE AS ... queries.
[ "Multi", "-", "row", "insert", "method", ".", "Used", "for", "CREATE", "TABLE", "AS", "...", "queries", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2261-L2274
60,649
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertNoCheck
private Row insertNoCheck(Session session, PersistentStore store, Object[] data) { Row row = (Row) store.getNewCachedObject(session, data); store.indexRow(session, row); session.addInsertAction(this, row); return row; }
java
private Row insertNoCheck(Session session, PersistentStore store, Object[] data) { Row row = (Row) store.getNewCachedObject(session, data); store.indexRow(session, row); session.addInsertAction(this, row); return row; }
[ "private", "Row", "insertNoCheck", "(", "Session", "session", ",", "PersistentStore", "store", ",", "Object", "[", "]", "data", ")", "{", "Row", "row", "=", "(", "Row", ")", "store", ".", "getNewCachedObject", "(", "session", ",", "data", ")", ";", "stor...
Low level method for row insert. UNIQUE or PRIMARY constraints are enforced by attempting to add the row to the indexes.
[ "Low", "level", "method", "for", "row", "insert", ".", "UNIQUE", "or", "PRIMARY", "constraints", "are", "enforced", "by", "attempting", "to", "add", "the", "row", "to", "the", "indexes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2281-L2290
60,650
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertSys
public int insertSys(PersistentStore store, Result ins) { RowSetNavigator nav = ins.getNavigator(); int count = 0; while (nav.hasNext()) { insertSys(store, nav.getNext()); count++; } return count; }
java
public int insertSys(PersistentStore store, Result ins) { RowSetNavigator nav = ins.getNavigator(); int count = 0; while (nav.hasNext()) { insertSys(store, nav.getNext()); count++; } return count; }
[ "public", "int", "insertSys", "(", "PersistentStore", "store", ",", "Result", "ins", ")", "{", "RowSetNavigator", "nav", "=", "ins", ".", "getNavigator", "(", ")", ";", "int", "count", "=", "0", ";", "while", "(", "nav", ".", "hasNext", "(", ")", ")", ...
Used for system table inserts. No checks. No identity columns.
[ "Used", "for", "system", "table", "inserts", ".", "No", "checks", ".", "No", "identity", "columns", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2310-L2322
60,651
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertResult
void insertResult(PersistentStore store, Result ins) { RowSetNavigator nav = ins.initialiseNavigator(); while (nav.hasNext()) { Object[] data = nav.getNext(); Object[] newData = (Object[]) ArrayUtil.resizeArrayIfDifferent(data, getColumnCount...
java
void insertResult(PersistentStore store, Result ins) { RowSetNavigator nav = ins.initialiseNavigator(); while (nav.hasNext()) { Object[] data = nav.getNext(); Object[] newData = (Object[]) ArrayUtil.resizeArrayIfDifferent(data, getColumnCount...
[ "void", "insertResult", "(", "PersistentStore", "store", ",", "Result", "ins", ")", "{", "RowSetNavigator", "nav", "=", "ins", ".", "initialiseNavigator", "(", ")", ";", "while", "(", "nav", ".", "hasNext", "(", ")", ")", "{", "Object", "[", "]", "data",...
Used for subquery inserts. No checks. No identity columns.
[ "Used", "for", "subquery", "inserts", ".", "No", "checks", ".", "No", "identity", "columns", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2328-L2340
60,652
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertFromScript
public void insertFromScript(PersistentStore store, Object[] data) { systemUpdateIdentityValue(data); insertData(store, data); }
java
public void insertFromScript(PersistentStore store, Object[] data) { systemUpdateIdentityValue(data); insertData(store, data); }
[ "public", "void", "insertFromScript", "(", "PersistentStore", "store", ",", "Object", "[", "]", "data", ")", "{", "systemUpdateIdentityValue", "(", "data", ")", ";", "insertData", "(", "store", ",", "data", ")", ";", "}" ]
Not for general use. Used by ScriptReader to unconditionally insert a row into the table when the .script file is read.
[ "Not", "for", "general", "use", ".", "Used", "by", "ScriptReader", "to", "unconditionally", "insert", "a", "row", "into", "the", "table", "when", "the", ".", "script", "file", "is", "read", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2347-L2350
60,653
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.systemUpdateIdentityValue
protected void systemUpdateIdentityValue(Object[] data) { if (identityColumn != -1) { Number id = (Number) data[identityColumn]; if (id != null) { identitySequence.systemUpdate(id.longValue()); } } }
java
protected void systemUpdateIdentityValue(Object[] data) { if (identityColumn != -1) { Number id = (Number) data[identityColumn]; if (id != null) { identitySequence.systemUpdate(id.longValue()); } } }
[ "protected", "void", "systemUpdateIdentityValue", "(", "Object", "[", "]", "data", ")", "{", "if", "(", "identityColumn", "!=", "-", "1", ")", "{", "Number", "id", "=", "(", "Number", ")", "data", "[", "identityColumn", "]", ";", "if", "(", "id", "!=",...
If there is an identity column in the table, sets the max identity value.
[ "If", "there", "is", "an", "identity", "column", "in", "the", "table", "sets", "the", "max", "identity", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2412-L2421
60,654
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.deleteNoRefCheck
void deleteNoRefCheck(Session session, Row row) { Object[] data = row.getData(); fireBeforeTriggers(session, Trigger.DELETE_BEFORE, data, null, null); if (isView) { return; } deleteNoCheck(session, row); }
java
void deleteNoRefCheck(Session session, Row row) { Object[] data = row.getData(); fireBeforeTriggers(session, Trigger.DELETE_BEFORE, data, null, null); if (isView) { return; } deleteNoCheck(session, row); }
[ "void", "deleteNoRefCheck", "(", "Session", "session", ",", "Row", "row", ")", "{", "Object", "[", "]", "data", "=", "row", ".", "getData", "(", ")", ";", "fireBeforeTriggers", "(", "session", ",", "Trigger", ".", "DELETE_BEFORE", ",", "data", ",", "null...
Mid level row delete method. Fires triggers but no integrity constraint checks.
[ "Mid", "level", "row", "delete", "method", ".", "Fires", "triggers", "but", "no", "integrity", "constraint", "checks", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2434-L2445
60,655
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.deleteNoCheck
private void deleteNoCheck(Session session, Row row) { if (row.isDeleted(session)) { return; } session.addDeleteAction(this, row); }
java
private void deleteNoCheck(Session session, Row row) { if (row.isDeleted(session)) { return; } session.addDeleteAction(this, row); }
[ "private", "void", "deleteNoCheck", "(", "Session", "session", ",", "Row", "row", ")", "{", "if", "(", "row", ".", "isDeleted", "(", "session", ")", ")", "{", "return", ";", "}", "session", ".", "addDeleteAction", "(", "this", ",", "row", ")", ";", "...
Low level row delete method. Removes the row from the indexes and from the Cache.
[ "Low", "level", "row", "delete", "method", ".", "Removes", "the", "row", "from", "the", "indexes", "and", "from", "the", "Cache", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2451-L2458
60,656
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.deleteNoCheckFromLog
public void deleteNoCheckFromLog(Session session, Object[] data) { Row row = null; PersistentStore store = session.sessionData.getRowStore(this); if (hasPrimaryKey()) { RowIterator it = getPrimaryIndex().findFirstRow(session, store, data, primaryKeyCol...
java
public void deleteNoCheckFromLog(Session session, Object[] data) { Row row = null; PersistentStore store = session.sessionData.getRowStore(this); if (hasPrimaryKey()) { RowIterator it = getPrimaryIndex().findFirstRow(session, store, data, primaryKeyCol...
[ "public", "void", "deleteNoCheckFromLog", "(", "Session", "session", ",", "Object", "[", "]", "data", ")", "{", "Row", "row", "=", "null", ";", "PersistentStore", "store", "=", "session", ".", "sessionData", ".", "getRowStore", "(", "this", ")", ";", "if",...
For log statements. Delete a single row.
[ "For", "log", "statements", ".", "Delete", "a", "single", "row", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2463-L2521
60,657
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.addTTL
public void addTTL(int ttlValue, String ttlUnit, String ttlColumn, int batchSize, int maxFrequency, String streamName) { dropTTL(); timeToLive = new TimeToLiveVoltDB(ttlValue, ttlUnit, getColumn(findColumn(ttlColumn)), batchSize, maxFrequency, streamName); }
java
public void addTTL(int ttlValue, String ttlUnit, String ttlColumn, int batchSize, int maxFrequency, String streamName) { dropTTL(); timeToLive = new TimeToLiveVoltDB(ttlValue, ttlUnit, getColumn(findColumn(ttlColumn)), batchSize, maxFrequency, streamName); }
[ "public", "void", "addTTL", "(", "int", "ttlValue", ",", "String", "ttlUnit", ",", "String", "ttlColumn", ",", "int", "batchSize", ",", "int", "maxFrequency", ",", "String", "streamName", ")", "{", "dropTTL", "(", ")", ";", "timeToLive", "=", "new", "TimeT...
A VoltDB extension to support TTL
[ "A", "VoltDB", "extension", "to", "support", "TTL" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2771-L2776
60,658
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarHeaderFields.java
TarHeaderFields.getStart
static public int getStart(int field) { Integer iObject = (Integer) starts.get(new Integer(field)); if (iObject == null) { throw new IllegalArgumentException( RB.singleton.getString(RB.UNEXPECTED_HEADER_KEY, field)); } return iObject.intValue(); }
java
static public int getStart(int field) { Integer iObject = (Integer) starts.get(new Integer(field)); if (iObject == null) { throw new IllegalArgumentException( RB.singleton.getString(RB.UNEXPECTED_HEADER_KEY, field)); } return iObject.intValue(); }
[ "static", "public", "int", "getStart", "(", "int", "field", ")", "{", "Integer", "iObject", "=", "(", "Integer", ")", "starts", ".", "get", "(", "new", "Integer", "(", "field", ")", ")", ";", "if", "(", "iObject", "==", "null", ")", "{", "throw", "...
not some problem with a Header, or generating or reading a Header.
[ "not", "some", "problem", "with", "a", "Header", "or", "generating", "or", "reading", "a", "Header", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarHeaderFields.java#L161-L171
60,659
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/MigrateRowsBase.java
MigrateRowsBase.executePrecompiledSQL
VoltTable executePrecompiledSQL(Statement catStmt, Object[] params, boolean replicated) throws VoltAbortException { // Create a SQLStmt instance on the fly // This is unusual to do, as they are typically required to be final instance variables. // This only works because the SQL text...
java
VoltTable executePrecompiledSQL(Statement catStmt, Object[] params, boolean replicated) throws VoltAbortException { // Create a SQLStmt instance on the fly // This is unusual to do, as they are typically required to be final instance variables. // This only works because the SQL text...
[ "VoltTable", "executePrecompiledSQL", "(", "Statement", "catStmt", ",", "Object", "[", "]", "params", ",", "boolean", "replicated", ")", "throws", "VoltAbortException", "{", "// Create a SQLStmt instance on the fly", "// This is unusual to do, as they are typically required to be...
Execute a pre-compiled adHoc SQL statement, throw exception if not. @return Count of rows inserted or upserted. @throws VoltAbortException if any failure at all.
[ "Execute", "a", "pre", "-", "compiled", "adHoc", "SQL", "statement", "throw", "exception", "if", "not", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/MigrateRowsBase.java#L65-L78
60,660
VoltDB/voltdb
src/frontend/org/voltdb/ClientAppBase.java
ClientAppBase.printLogStatic
protected static void printLogStatic(String className, String msg, Object...args) { if (args != null) { msg = String.format(msg, args); } String header = String.format("%s [%s] ", ZonedDateTime.now().format(TIME_FORMAT), className); System.out...
java
protected static void printLogStatic(String className, String msg, Object...args) { if (args != null) { msg = String.format(msg, args); } String header = String.format("%s [%s] ", ZonedDateTime.now().format(TIME_FORMAT), className); System.out...
[ "protected", "static", "void", "printLogStatic", "(", "String", "className", ",", "String", "msg", ",", "Object", "...", "args", ")", "{", "if", "(", "args", "!=", "null", ")", "{", "msg", "=", "String", ".", "format", "(", "msg", ",", "args", ")", "...
The static method to print a log message to the console. @param className Name of the class that prints this message. @param msg The log message that needs to be printed. @param args The arguments that may be needed for formatting the message.
[ "The", "static", "method", "to", "print", "a", "log", "message", "to", "the", "console", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientAppBase.java#L53-L63
60,661
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserRoutine.java
ParserRoutine.compileSetStatement
StatementSimple compileSetStatement(RangeVariable rangeVars[]) { read(); OrderedHashSet colNames = new OrderedHashSet(); HsqlArrayList exprList = new HsqlArrayList(); readSetClauseList(rangeVars, colNames, exprList); if (exprList.size() > 1) { throw Error.error(E...
java
StatementSimple compileSetStatement(RangeVariable rangeVars[]) { read(); OrderedHashSet colNames = new OrderedHashSet(); HsqlArrayList exprList = new HsqlArrayList(); readSetClauseList(rangeVars, colNames, exprList); if (exprList.size() > 1) { throw Error.error(E...
[ "StatementSimple", "compileSetStatement", "(", "RangeVariable", "rangeVars", "[", "]", ")", "{", "read", "(", ")", ";", "OrderedHashSet", "colNames", "=", "new", "OrderedHashSet", "(", ")", ";", "HsqlArrayList", "exprList", "=", "new", "HsqlArrayList", "(", ")",...
Creates SET Statement for PSM from this parse context.
[ "Creates", "SET", "Statement", "for", "PSM", "from", "this", "parse", "context", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserRoutine.java#L178-L215
60,662
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserRoutine.java
ParserRoutine.compileCreateProcedureOrFunction
StatementSchema compileCreateProcedureOrFunction() { int routineType = token.tokenType == Tokens.PROCEDURE ? SchemaObject.PROCEDURE : SchemaObject.FUNCTION; HsqlName name; read(); name = readNewSchemaObjectNameNoCheck(routineType); ...
java
StatementSchema compileCreateProcedureOrFunction() { int routineType = token.tokenType == Tokens.PROCEDURE ? SchemaObject.PROCEDURE : SchemaObject.FUNCTION; HsqlName name; read(); name = readNewSchemaObjectNameNoCheck(routineType); ...
[ "StatementSchema", "compileCreateProcedureOrFunction", "(", ")", "{", "int", "routineType", "=", "token", ".", "tokenType", "==", "Tokens", ".", "PROCEDURE", "?", "SchemaObject", ".", "PROCEDURE", ":", "SchemaObject", ".", "FUNCTION", ";", "HsqlName", "name", ";",...
SQL-invoked routine
[ "SQL", "-", "invoked", "routine" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserRoutine.java#L241-L348
60,663
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.close
void close(boolean script) { closeLog(); deleteNewAndOldFiles(); writeScript(script); closeAllTextCaches(script); if (cache != null) { cache.close(true); } properties.setProperty(HsqlDatabaseProperties.db_version, Hsql...
java
void close(boolean script) { closeLog(); deleteNewAndOldFiles(); writeScript(script); closeAllTextCaches(script); if (cache != null) { cache.close(true); } properties.setProperty(HsqlDatabaseProperties.db_version, Hsql...
[ "void", "close", "(", "boolean", "script", ")", "{", "closeLog", "(", ")", ";", "deleteNewAndOldFiles", "(", ")", ";", "writeScript", "(", "script", ")", ";", "closeAllTextCaches", "(", "script", ")", ";", "if", "(", "cache", "!=", "null", ")", "{", "c...
Close all the database files. If script argument is true, no .data or .backup file will remain and the .script file will contain all the data of the cached tables as well as memory tables. This is not used for filesReadOnly databases which use shutdown.
[ "Close", "all", "the", "database", "files", ".", "If", "script", "argument", "is", "true", "no", ".", "data", "or", ".", "backup", "file", "will", "remain", "and", "the", ".", "script", "file", "will", "contain", "all", "the", "data", "of", "the", "cac...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L253-L288
60,664
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.deleteNewAndOldFiles
void deleteNewAndOldFiles() { fa.removeElement(fileName + ".data" + ".old"); fa.removeElement(fileName + ".data" + ".new"); fa.removeElement(fileName + ".backup" + ".new"); fa.removeElement(scriptFileName + ".new"); }
java
void deleteNewAndOldFiles() { fa.removeElement(fileName + ".data" + ".old"); fa.removeElement(fileName + ".data" + ".new"); fa.removeElement(fileName + ".backup" + ".new"); fa.removeElement(scriptFileName + ".new"); }
[ "void", "deleteNewAndOldFiles", "(", ")", "{", "fa", ".", "removeElement", "(", "fileName", "+", "\".data\"", "+", "\".old\"", ")", ";", "fa", ".", "removeElement", "(", "fileName", "+", "\".data\"", "+", "\".new\"", ")", ";", "fa", ".", "removeElement", "...
Deletes the leftovers from any previous unfinished operations.
[ "Deletes", "the", "leftovers", "from", "any", "previous", "unfinished", "operations", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L309-L315
60,665
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.forceDefrag
boolean forceDefrag() { long megas = properties.getIntegerProperty( HsqlDatabaseProperties.hsqldb_defrag_limit, 200); long defraglimit = megas * 1024L * 1024; long lostSize = cache.freeBlocks.getLostBlocksSize(); return lostSize > defraglimit; }
java
boolean forceDefrag() { long megas = properties.getIntegerProperty( HsqlDatabaseProperties.hsqldb_defrag_limit, 200); long defraglimit = megas * 1024L * 1024; long lostSize = cache.freeBlocks.getLostBlocksSize(); return lostSize > defraglimit; }
[ "boolean", "forceDefrag", "(", ")", "{", "long", "megas", "=", "properties", ".", "getIntegerProperty", "(", "HsqlDatabaseProperties", ".", "hsqldb_defrag_limit", ",", "200", ")", ";", "long", "defraglimit", "=", "megas", "*", "1024L", "*", "1024", ";", "long"...
Returns true if lost space is above the threshold
[ "Returns", "true", "if", "lost", "space", "is", "above", "the", "threshold" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L531-L539
60,666
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.getCache
DataFileCache getCache() { /* if (database.isFilesInJar()) { return null; } */ if (cache == null) { cache = new DataFileCache(database, fileName); cache.open(filesReadOnly); } return cache; }
java
DataFileCache getCache() { /* if (database.isFilesInJar()) { return null; } */ if (cache == null) { cache = new DataFileCache(database, fileName); cache.open(filesReadOnly); } return cache; }
[ "DataFileCache", "getCache", "(", ")", "{", "/*\n if (database.isFilesInJar()) {\n return null;\n }\n*/", "if", "(", "cache", "==", "null", ")", "{", "cache", "=", "new", "DataFileCache", "(", "database", ",", "fileName", ")", ";", "cache", "....
Responsible for creating the cache instance.
[ "Responsible", "for", "creating", "the", "cache", "instance", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L551-L565
60,667
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.setScriptType
void setScriptType(int type) { // OOo related code if (database.isStoredFileAccess()) { return; } // OOo end boolean needsCheckpoint = scriptFormat != type; scriptFormat = type; properties.setProperty(HsqlDatabaseProperties.hsqldb_script_format, ...
java
void setScriptType(int type) { // OOo related code if (database.isStoredFileAccess()) { return; } // OOo end boolean needsCheckpoint = scriptFormat != type; scriptFormat = type; properties.setProperty(HsqlDatabaseProperties.hsqldb_script_format, ...
[ "void", "setScriptType", "(", "int", "type", ")", "{", "// OOo related code", "if", "(", "database", ".", "isStoredFileAccess", "(", ")", ")", "{", "return", ";", "}", "// OOo end", "boolean", "needsCheckpoint", "=", "scriptFormat", "!=", "type", ";", "scriptF...
Changing the script format results in a checkpoint, with the .script file written in the new format.
[ "Changing", "the", "script", "format", "results", "in", "a", "checkpoint", "with", "the", ".", "script", "file", "written", "in", "the", "new", "format", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L587-L605
60,668
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.writeScript
private void writeScript(boolean full) { deleteNewScript(); //fredt - to do - flag for chache set index ScriptWriterBase scw = ScriptWriterBase.newScriptWriter(database, scriptFileName + ".new", full, true, scriptFormat); scw.writeAll(); scw.close(); }
java
private void writeScript(boolean full) { deleteNewScript(); //fredt - to do - flag for chache set index ScriptWriterBase scw = ScriptWriterBase.newScriptWriter(database, scriptFileName + ".new", full, true, scriptFormat); scw.writeAll(); scw.close(); }
[ "private", "void", "writeScript", "(", "boolean", "full", ")", "{", "deleteNewScript", "(", ")", ";", "//fredt - to do - flag for chache set index", "ScriptWriterBase", "scw", "=", "ScriptWriterBase", ".", "newScriptWriter", "(", "database", ",", "scriptFileName", "+", ...
Write the .script file as .script.new.
[ "Write", "the", ".", "script", "file", "as", ".", "script", ".", "new", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L753-L763
60,669
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.processScript
private void processScript() { ScriptReaderBase scr = null; try { if (database.isFilesInJar() || fa.isStreamElement(scriptFileName)) { scr = ScriptReaderBase.newScriptReader(database, scriptFileName,...
java
private void processScript() { ScriptReaderBase scr = null; try { if (database.isFilesInJar() || fa.isStreamElement(scriptFileName)) { scr = ScriptReaderBase.newScriptReader(database, scriptFileName,...
[ "private", "void", "processScript", "(", ")", "{", "ScriptReaderBase", "scr", "=", "null", ";", "try", "{", "if", "(", "database", ".", "isFilesInJar", "(", ")", "||", "fa", ".", "isStreamElement", "(", "scriptFileName", ")", ")", "{", "scr", "=", "Scrip...
Performs all the commands in the .script file.
[ "Performs", "all", "the", "commands", "in", "the", ".", "script", "file", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L768-L808
60,670
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.processDataFile
private void processDataFile() { // OOo related code if (database.isStoredFileAccess()) { return; } // OOo end if (cache == null || filesReadOnly || !fa.isStreamElement(logFileName)) { return; } File file = new File...
java
private void processDataFile() { // OOo related code if (database.isStoredFileAccess()) { return; } // OOo end if (cache == null || filesReadOnly || !fa.isStreamElement(logFileName)) { return; } File file = new File...
[ "private", "void", "processDataFile", "(", ")", "{", "// OOo related code", "if", "(", "database", ".", "isStoredFileAccess", "(", ")", ")", "{", "return", ";", "}", "// OOo end", "if", "(", "cache", "==", "null", "||", "filesReadOnly", "||", "!", "fa", "....
Defrag large data files when the sum of .log and .data files is large.
[ "Defrag", "large", "data", "files", "when", "the", "sum", "of", ".", "log", "and", ".", "data", "files", "is", "large", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L813-L833
60,671
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.processLog
private void processLog() { if (!database.isFilesInJar() && fa.isStreamElement(logFileName)) { ScriptRunner.runScript(database, logFileName, ScriptWriterBase.SCRIPT_TEXT_170); } }
java
private void processLog() { if (!database.isFilesInJar() && fa.isStreamElement(logFileName)) { ScriptRunner.runScript(database, logFileName, ScriptWriterBase.SCRIPT_TEXT_170); } }
[ "private", "void", "processLog", "(", ")", "{", "if", "(", "!", "database", ".", "isFilesInJar", "(", ")", "&&", "fa", ".", "isStreamElement", "(", "logFileName", ")", ")", "{", "ScriptRunner", ".", "runScript", "(", "database", ",", "logFileName", ",", ...
Performs all the commands in the .log file.
[ "Performs", "all", "the", "commands", "in", "the", ".", "log", "file", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L838-L844
60,672
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.restoreBackup
private void restoreBackup() { if (incBackup) { restoreBackupIncremental(); return; } // in case data file cannot be deleted, reset it DataFileCache.deleteOrResetFreePos(database, fileName + ".data"); try { FileArchiver.unarchive(fileName +...
java
private void restoreBackup() { if (incBackup) { restoreBackupIncremental(); return; } // in case data file cannot be deleted, reset it DataFileCache.deleteOrResetFreePos(database, fileName + ".data"); try { FileArchiver.unarchive(fileName +...
[ "private", "void", "restoreBackup", "(", ")", "{", "if", "(", "incBackup", ")", "{", "restoreBackupIncremental", "(", ")", ";", "return", ";", "}", "// in case data file cannot be deleted, reset it", "DataFileCache", ".", "deleteOrResetFreePos", "(", "database", ",", ...
Restores a compressed backup or the .data file.
[ "Restores", "a", "compressed", "backup", "or", "the", ".", "data", "file", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L849-L870
60,673
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java
Log.restoreBackupIncremental
private void restoreBackupIncremental() { try { if (fa.isStreamElement(fileName + ".backup")) { RAShadowFile.restoreFile(fileName + ".backup", fileName + ".data"); } else { /* // this is to ensure file has been wri...
java
private void restoreBackupIncremental() { try { if (fa.isStreamElement(fileName + ".backup")) { RAShadowFile.restoreFile(fileName + ".backup", fileName + ".data"); } else { /* // this is to ensure file has been wri...
[ "private", "void", "restoreBackupIncremental", "(", ")", "{", "try", "{", "if", "(", "fa", ".", "isStreamElement", "(", "fileName", "+", "\".backup\"", ")", ")", "{", "RAShadowFile", ".", "restoreFile", "(", "fileName", "+", "\".backup\"", ",", "fileName", "...
Restores in from an incremental backup
[ "Restores", "in", "from", "an", "incremental", "backup" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L875-L900
60,674
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpInitiator.java
MpInitiator.updateCatalog
public void updateCatalog(String diffCmds, CatalogContext context, boolean isReplay, boolean requireCatalogDiffCmdsApplyToEE, boolean requiresNewExportGeneration) { // note this will never require snapshot isolation because the MPI has no snapshot funtionality m_executionSite.updateCatal...
java
public void updateCatalog(String diffCmds, CatalogContext context, boolean isReplay, boolean requireCatalogDiffCmdsApplyToEE, boolean requiresNewExportGeneration) { // note this will never require snapshot isolation because the MPI has no snapshot funtionality m_executionSite.updateCatal...
[ "public", "void", "updateCatalog", "(", "String", "diffCmds", ",", "CatalogContext", "context", ",", "boolean", "isReplay", ",", "boolean", "requireCatalogDiffCmdsApplyToEE", ",", "boolean", "requiresNewExportGeneration", ")", "{", "// note this will never require snapshot is...
Update the MPI's Site's catalog. Unlike the SPI, this is not going to run from the same Site's thread; this is actually going to run from some other local SPI's Site thread. Since the MPI's site thread is going to be blocked running the EveryPartitionTask for the catalog update, this is currently safe with no locking...
[ "Update", "the", "MPI", "s", "Site", "s", "catalog", ".", "Unlike", "the", "SPI", "this", "is", "not", "going", "to", "run", "from", "the", "same", "Site", "s", "thread", ";", "this", "is", "actually", "going", "to", "run", "from", "some", "other", "...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpInitiator.java#L216-L223
60,675
VoltDB/voltdb
src/frontend/org/voltdb/AbstractTopology.java
AbstractTopology.mutateAddNewHosts
public static Pair<AbstractTopology, ImmutableList<Integer>> mutateAddNewHosts(AbstractTopology currentTopology, Map<Integer, HostInfo> newHostInfos) { int startingPartitionId = getNextFreePartitionId(currentTopology); TopologyBuilder topologyBuilder = addPartitionsToHosts(newHostInfos, Col...
java
public static Pair<AbstractTopology, ImmutableList<Integer>> mutateAddNewHosts(AbstractTopology currentTopology, Map<Integer, HostInfo> newHostInfos) { int startingPartitionId = getNextFreePartitionId(currentTopology); TopologyBuilder topologyBuilder = addPartitionsToHosts(newHostInfos, Col...
[ "public", "static", "Pair", "<", "AbstractTopology", ",", "ImmutableList", "<", "Integer", ">", ">", "mutateAddNewHosts", "(", "AbstractTopology", "currentTopology", ",", "Map", "<", "Integer", ",", "HostInfo", ">", "newHostInfos", ")", "{", "int", "startingPartit...
Add new hosts to an existing topology and layout partitions on those hosts @param currentTopology to extend @param newHostInfos new hosts to add to topology @return update {@link AbstractTopology} with new hosts and {@link ImmutableList} of new partition IDs @throws RuntimeException if hosts are not valid for topol...
[ "Add", "new", "hosts", "to", "an", "existing", "topology", "and", "layout", "partitions", "on", "those", "hosts" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/AbstractTopology.java#L923-L936
60,676
VoltDB/voltdb
src/frontend/org/voltdb/AbstractTopology.java
AbstractTopology.mutateRemoveHosts
public static Pair<AbstractTopology, Set<Integer>> mutateRemoveHosts(AbstractTopology currentTopology, Set<Integer> removalHosts) { Set<Integer> removalPartitionIds = getPartitionIdsForHosts(currentTopology, removalHosts); return ...
java
public static Pair<AbstractTopology, Set<Integer>> mutateRemoveHosts(AbstractTopology currentTopology, Set<Integer> removalHosts) { Set<Integer> removalPartitionIds = getPartitionIdsForHosts(currentTopology, removalHosts); return ...
[ "public", "static", "Pair", "<", "AbstractTopology", ",", "Set", "<", "Integer", ">", ">", "mutateRemoveHosts", "(", "AbstractTopology", "currentTopology", ",", "Set", "<", "Integer", ">", "removalHosts", ")", "{", "Set", "<", "Integer", ">", "removalPartitionId...
Remove hosts from an existing topology @param currentTopology to extend @param removalHostInfos hosts to be removed from topology @return update {@link AbstractTopology} with remaining hosts and removed partition IDs @throws RuntimeException if hosts are not valid for topology
[ "Remove", "hosts", "from", "an", "existing", "topology" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/AbstractTopology.java#L946-L950
60,677
VoltDB/voltdb
src/frontend/org/voltdb/AbstractTopology.java
AbstractTopology.getPartitionGroupPeers
public Set<Integer> getPartitionGroupPeers(int hostId) { Set<Integer> peers = Sets.newHashSet(); for (Partition p : hostsById.get(hostId).partitions) { peers.addAll(p.hostIds); } return peers; }
java
public Set<Integer> getPartitionGroupPeers(int hostId) { Set<Integer> peers = Sets.newHashSet(); for (Partition p : hostsById.get(hostId).partitions) { peers.addAll(p.hostIds); } return peers; }
[ "public", "Set", "<", "Integer", ">", "getPartitionGroupPeers", "(", "int", "hostId", ")", "{", "Set", "<", "Integer", ">", "peers", "=", "Sets", ".", "newHashSet", "(", ")", ";", "for", "(", "Partition", "p", ":", "hostsById", ".", "get", "(", "hostId...
get all the hostIds in the partition group where the host with the given host id belongs @param hostId the given hostId @return all the hostIds in the partition group
[ "get", "all", "the", "hostIds", "in", "the", "partition", "group", "where", "the", "host", "with", "the", "given", "host", "id", "belongs" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/AbstractTopology.java#L1393-L1399
60,678
VoltDB/voltdb
src/frontend/org/voltdb/AbstractTopology.java
AbstractTopology.sortHostIdByHGDistance
public static List<Collection<Integer>> sortHostIdByHGDistance(int hostId, Map<Integer, String> hostGroups) { String localHostGroup = hostGroups.get(hostId); Preconditions.checkArgument(localHostGroup != null); HAGroup localHaGroup = new HAGroup(localHostGroup); // Memorize the distanc...
java
public static List<Collection<Integer>> sortHostIdByHGDistance(int hostId, Map<Integer, String> hostGroups) { String localHostGroup = hostGroups.get(hostId); Preconditions.checkArgument(localHostGroup != null); HAGroup localHaGroup = new HAGroup(localHostGroup); // Memorize the distanc...
[ "public", "static", "List", "<", "Collection", "<", "Integer", ">", ">", "sortHostIdByHGDistance", "(", "int", "hostId", ",", "Map", "<", "Integer", ",", "String", ">", "hostGroups", ")", "{", "String", "localHostGroup", "=", "hostGroups", ".", "get", "(", ...
Sort all nodes in reverse hostGroup distance order, then group by rack-aware group, local host id is excluded. @param hostId the local host id @param hostGroups a host id to group map @return sorted grouped host ids from farthest to nearest
[ "Sort", "all", "nodes", "in", "reverse", "hostGroup", "distance", "order", "then", "group", "by", "rack", "-", "aware", "group", "local", "host", "id", "is", "excluded", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/AbstractTopology.java#L1435-L1452
60,679
VoltDB/voltdb
src/frontend/org/voltdb/importer/ImporterStatsCollector.java
ImporterStatsCollector.reportQueued
public void reportQueued(String importerName, String procName) { StatsInfo statsInfo = getStatsInfo(importerName, procName); statsInfo.m_pendingCount.incrementAndGet(); }
java
public void reportQueued(String importerName, String procName) { StatsInfo statsInfo = getStatsInfo(importerName, procName); statsInfo.m_pendingCount.incrementAndGet(); }
[ "public", "void", "reportQueued", "(", "String", "importerName", ",", "String", "procName", ")", "{", "StatsInfo", "statsInfo", "=", "getStatsInfo", "(", "importerName", ",", "procName", ")", ";", "statsInfo", ".", "m_pendingCount", ".", "incrementAndGet", "(", ...
An insert request was queued
[ "An", "insert", "request", "was", "queued" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImporterStatsCollector.java#L74-L77
60,680
VoltDB/voltdb
src/frontend/org/voltdb/importer/ImporterStatsCollector.java
ImporterStatsCollector.reportFailure
public void reportFailure(String importerName, String procName, boolean decrementPending) { StatsInfo statsInfo = getStatsInfo(importerName, procName); if (decrementPending) { statsInfo.m_pendingCount.decrementAndGet(); } statsInfo.m_failureCount.incrementAndGet(); }
java
public void reportFailure(String importerName, String procName, boolean decrementPending) { StatsInfo statsInfo = getStatsInfo(importerName, procName); if (decrementPending) { statsInfo.m_pendingCount.decrementAndGet(); } statsInfo.m_failureCount.incrementAndGet(); }
[ "public", "void", "reportFailure", "(", "String", "importerName", ",", "String", "procName", ",", "boolean", "decrementPending", ")", "{", "StatsInfo", "statsInfo", "=", "getStatsInfo", "(", "importerName", ",", "procName", ")", ";", "if", "(", "decrementPending",...
Use this when the insert fails even before the request is queued by the InternalConnectionHandler
[ "Use", "this", "when", "the", "insert", "fails", "even", "before", "the", "request", "is", "queued", "by", "the", "InternalConnectionHandler" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImporterStatsCollector.java#L85-L91
60,681
VoltDB/voltdb
src/frontend/org/voltdb/importer/ImporterStatsCollector.java
ImporterStatsCollector.reportSuccess
private void reportSuccess(String importerName, String procName) { StatsInfo statsInfo = getStatsInfo(importerName, procName); statsInfo.m_pendingCount.decrementAndGet(); statsInfo.m_successCount.incrementAndGet(); }
java
private void reportSuccess(String importerName, String procName) { StatsInfo statsInfo = getStatsInfo(importerName, procName); statsInfo.m_pendingCount.decrementAndGet(); statsInfo.m_successCount.incrementAndGet(); }
[ "private", "void", "reportSuccess", "(", "String", "importerName", ",", "String", "procName", ")", "{", "StatsInfo", "statsInfo", "=", "getStatsInfo", "(", "importerName", ",", "procName", ")", ";", "statsInfo", ".", "m_pendingCount", ".", "decrementAndGet", "(", ...
One insert succeeded
[ "One", "insert", "succeeded" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImporterStatsCollector.java#L99-L103
60,682
VoltDB/voltdb
src/frontend/org/voltdb/importer/ImporterStatsCollector.java
ImporterStatsCollector.reportRetry
private void reportRetry(String importerName, String procName) { StatsInfo statsInfo = getStatsInfo(importerName, procName); statsInfo.m_retryCount.incrementAndGet(); }
java
private void reportRetry(String importerName, String procName) { StatsInfo statsInfo = getStatsInfo(importerName, procName); statsInfo.m_retryCount.incrementAndGet(); }
[ "private", "void", "reportRetry", "(", "String", "importerName", ",", "String", "procName", ")", "{", "StatsInfo", "statsInfo", "=", "getStatsInfo", "(", "importerName", ",", "procName", ")", ";", "statsInfo", ".", "m_retryCount", ".", "incrementAndGet", "(", ")...
One insert was retried
[ "One", "insert", "was", "retried" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ImporterStatsCollector.java#L106-L109
60,683
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarFileOutputStream.java
TarFileOutputStream.writeBlock
public void writeBlock(byte[] block) throws IOException { if (block.length != 512) { throw new IllegalArgumentException( RB.singleton.getString(RB.BAD_BLOCK_WRITE_LEN, block.length)); } write(block, block.length); }
java
public void writeBlock(byte[] block) throws IOException { if (block.length != 512) { throw new IllegalArgumentException( RB.singleton.getString(RB.BAD_BLOCK_WRITE_LEN, block.length)); } write(block, block.length); }
[ "public", "void", "writeBlock", "(", "byte", "[", "]", "block", ")", "throws", "IOException", "{", "if", "(", "block", ".", "length", "!=", "512", ")", "{", "throw", "new", "IllegalArgumentException", "(", "RB", ".", "singleton", ".", "getString", "(", "...
Write a user-specified 512-byte block. For efficiency, write(int) should be used when writing file body content. @see #write(int)
[ "Write", "a", "user", "-", "specified", "512", "-", "byte", "block", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarFileOutputStream.java#L219-L227
60,684
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarFileOutputStream.java
TarFileOutputStream.writePadBlocks
public void writePadBlocks(int blockCount) throws IOException { for (int i = 0; i < blockCount; i++) { write(ZERO_BLOCK, ZERO_BLOCK.length); } }
java
public void writePadBlocks(int blockCount) throws IOException { for (int i = 0; i < blockCount; i++) { write(ZERO_BLOCK, ZERO_BLOCK.length); } }
[ "public", "void", "writePadBlocks", "(", "int", "blockCount", ")", "throws", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "blockCount", ";", "i", "++", ")", "{", "write", "(", "ZERO_BLOCK", ",", "ZERO_BLOCK", ".", "length", ")",...
Writes the specified quantity of zero'd blocks.
[ "Writes", "the", "specified", "quantity", "of", "zero", "d", "blocks", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarFileOutputStream.java#L232-L237
60,685
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java
ZaurusEditor.getAllTables
private Vector getAllTables() { Vector result = new Vector(20); try { if (cConn == null) { return null; } dbmeta = cConn.getMetaData(); String[] tableTypes = { "TABLE" }; ResultSet allTables = dbmeta.getTables(null, null, nu...
java
private Vector getAllTables() { Vector result = new Vector(20); try { if (cConn == null) { return null; } dbmeta = cConn.getMetaData(); String[] tableTypes = { "TABLE" }; ResultSet allTables = dbmeta.getTables(null, null, nu...
[ "private", "Vector", "getAllTables", "(", ")", "{", "Vector", "result", "=", "new", "Vector", "(", "20", ")", ";", "try", "{", "if", "(", "cConn", "==", "null", ")", "{", "return", "null", ";", "}", "dbmeta", "=", "cConn", ".", "getMetaData", "(", ...
exclude tables without primary key
[ "exclude", "tables", "without", "primary", "key" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java#L572-L607
60,686
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java
ZaurusEditor.getChoosenTableIndex
private int getChoosenTableIndex() { String tableName = cTables.getSelectedItem(); // System.out.println("in getChoosenTableIndex, selected Item is "+tableName); int index = getTableIndex(tableName); if (index >= 0) { // System.out.println("table found, index: " + index);...
java
private int getChoosenTableIndex() { String tableName = cTables.getSelectedItem(); // System.out.println("in getChoosenTableIndex, selected Item is "+tableName); int index = getTableIndex(tableName); if (index >= 0) { // System.out.println("table found, index: " + index);...
[ "private", "int", "getChoosenTableIndex", "(", ")", "{", "String", "tableName", "=", "cTables", ".", "getSelectedItem", "(", ")", ";", "// System.out.println(\"in getChoosenTableIndex, selected Item is \"+tableName);", "int", "index", "=", "getTableIndex", "(", "tableName",...
if the table name is not in vHoldTableNames, create a ZaurusTableForm for it
[ "if", "the", "table", "name", "is", "not", "in", "vHoldTableNames", "create", "a", "ZaurusTableForm", "for", "it" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java#L611-L632
60,687
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java
ZaurusEditor.getTableIndex
private int getTableIndex(String tableName) { int index; // System.out.println("begin searching for "+tableName); for (index = 0; index < vHoldTableNames.size(); index++) { // System.out.println("in getTableIndex searching for "+tableName+", index: "+index); if (tableN...
java
private int getTableIndex(String tableName) { int index; // System.out.println("begin searching for "+tableName); for (index = 0; index < vHoldTableNames.size(); index++) { // System.out.println("in getTableIndex searching for "+tableName+", index: "+index); if (tableN...
[ "private", "int", "getTableIndex", "(", "String", "tableName", ")", "{", "int", "index", ";", "// System.out.println(\"begin searching for \"+tableName);", "for", "(", "index", "=", "0", ";", "index", "<", "vHoldTableNames", ".", "size", "(", ")", ";", "index", ...
if the name is not in vHoldTableNames, answer -1
[ "if", "the", "name", "is", "not", "in", "vHoldTableNames", "answer", "-", "1" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java#L636-L650
60,688
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java
ZaurusEditor.getWords
private String[] getWords() { StringTokenizer tokenizer = new StringTokenizer(fSearchWords.getText()); String[] result = new String[tokenizer.countTokens()]; int i = 0; while (tokenizer.hasMoreTokens()) { result[i++] = tokenizer.nextToken(); } ...
java
private String[] getWords() { StringTokenizer tokenizer = new StringTokenizer(fSearchWords.getText()); String[] result = new String[tokenizer.countTokens()]; int i = 0; while (tokenizer.hasMoreTokens()) { result[i++] = tokenizer.nextToken(); } ...
[ "private", "String", "[", "]", "getWords", "(", ")", "{", "StringTokenizer", "tokenizer", "=", "new", "StringTokenizer", "(", "fSearchWords", ".", "getText", "(", ")", ")", ";", "String", "[", "]", "result", "=", "new", "String", "[", "tokenizer", ".", "...
convert the search words in the textfield to an array of words
[ "convert", "the", "search", "words", "in", "the", "textfield", "to", "an", "array", "of", "words" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java#L653-L665
60,689
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java
ZaurusEditor.initButtons
private void initButtons() { // the buttons for the search form bSearchRow = new Button("Search Rows"); bNewRow = new Button("Insert New Row"); bSearchRow.addActionListener(this); bNewRow.addActionListener(this); pSearchButs = new Panel(); pSearchButs.setLa...
java
private void initButtons() { // the buttons for the search form bSearchRow = new Button("Search Rows"); bNewRow = new Button("Insert New Row"); bSearchRow.addActionListener(this); bNewRow.addActionListener(this); pSearchButs = new Panel(); pSearchButs.setLa...
[ "private", "void", "initButtons", "(", ")", "{", "// the buttons for the search form", "bSearchRow", "=", "new", "Button", "(", "\"Search Rows\"", ")", ";", "bNewRow", "=", "new", "Button", "(", "\"Insert New Row\"", ")", ";", "bSearchRow", ".", "addActionListener",...
init the three boxes for buttons
[ "init", "the", "three", "boxes", "for", "buttons" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java#L668-L721
60,690
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java
ZaurusEditor.resetTableForms
private void resetTableForms() { lForm.show(pForm, "search"); lButton.show(pButton, "search"); Vector vAllTables = getAllTables(); // fill the drop down list again // get all table names and show a drop down list of them in cTables cTables.removeAll(); for (En...
java
private void resetTableForms() { lForm.show(pForm, "search"); lButton.show(pButton, "search"); Vector vAllTables = getAllTables(); // fill the drop down list again // get all table names and show a drop down list of them in cTables cTables.removeAll(); for (En...
[ "private", "void", "resetTableForms", "(", ")", "{", "lForm", ".", "show", "(", "pForm", ",", "\"search\"", ")", ";", "lButton", ".", "show", "(", "pButton", ",", "\"search\"", ")", ";", "Vector", "vAllTables", "=", "getAllTables", "(", ")", ";", "// fil...
reset everything after changes in the database
[ "reset", "everything", "after", "changes", "in", "the", "database" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusEditor.java#L735-L758
60,691
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedUnionStmt.java
ParsedUnionStmt.getLeftmostSelectStmt
private ParsedSelectStmt getLeftmostSelectStmt() { assert (!m_children.isEmpty()); AbstractParsedStmt firstChild = m_children.get(0); if (firstChild instanceof ParsedSelectStmt) { return (ParsedSelectStmt) firstChild; } else { assert(firstChild instanceof ParsedUn...
java
private ParsedSelectStmt getLeftmostSelectStmt() { assert (!m_children.isEmpty()); AbstractParsedStmt firstChild = m_children.get(0); if (firstChild instanceof ParsedSelectStmt) { return (ParsedSelectStmt) firstChild; } else { assert(firstChild instanceof ParsedUn...
[ "private", "ParsedSelectStmt", "getLeftmostSelectStmt", "(", ")", "{", "assert", "(", "!", "m_children", ".", "isEmpty", "(", ")", ")", ";", "AbstractParsedStmt", "firstChild", "=", "m_children", ".", "get", "(", "0", ")", ";", "if", "(", "firstChild", "inst...
Return the leftmost child SELECT statement @return ParsedSelectStmt
[ "Return", "the", "leftmost", "child", "SELECT", "statement" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedUnionStmt.java#L353-L362
60,692
VoltDB/voltdb
src/frontend/org/voltdb/planner/ParsedUnionStmt.java
ParsedUnionStmt.calculateContentDeterminismMessage
@Override public String calculateContentDeterminismMessage() { String ans = null; for (AbstractParsedStmt child : m_children) { ans = child.getContentDeterminismMessage(); if (ans != null) { return ans; } } return null; }
java
@Override public String calculateContentDeterminismMessage() { String ans = null; for (AbstractParsedStmt child : m_children) { ans = child.getContentDeterminismMessage(); if (ans != null) { return ans; } } return null; }
[ "@", "Override", "public", "String", "calculateContentDeterminismMessage", "(", ")", "{", "String", "ans", "=", "null", ";", "for", "(", "AbstractParsedStmt", "child", ":", "m_children", ")", "{", "ans", "=", "child", ".", "getContentDeterminismMessage", "(", ")...
Here we search all the children, finding if each is content deterministic. If it is we return right away.
[ "Here", "we", "search", "all", "the", "children", "finding", "if", "each", "is", "content", "deterministic", ".", "If", "it", "is", "we", "return", "right", "away", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedUnionStmt.java#L477-L487
60,693
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.rollLog
public synchronized void rollLog() throws IOException { if (logStream != null) { this.logStream.flush(); this.logStream = null; oa = null; } }
java
public synchronized void rollLog() throws IOException { if (logStream != null) { this.logStream.flush(); this.logStream = null; oa = null; } }
[ "public", "synchronized", "void", "rollLog", "(", ")", "throws", "IOException", "{", "if", "(", "logStream", "!=", "null", ")", "{", "this", ".", "logStream", ".", "flush", "(", ")", ";", "this", ".", "logStream", "=", "null", ";", "oa", "=", "null", ...
rollover the current log file to a new one. @throws IOException
[ "rollover", "the", "current", "log", "file", "to", "a", "new", "one", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L163-L169
60,694
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.close
public synchronized void close() throws IOException { if (logStream != null) { logStream.close(); } for (FileOutputStream log : streamsToFlush) { log.close(); } }
java
public synchronized void close() throws IOException { if (logStream != null) { logStream.close(); } for (FileOutputStream log : streamsToFlush) { log.close(); } }
[ "public", "synchronized", "void", "close", "(", ")", "throws", "IOException", "{", "if", "(", "logStream", "!=", "null", ")", "{", "logStream", ".", "close", "(", ")", ";", "}", "for", "(", "FileOutputStream", "log", ":", "streamsToFlush", ")", "{", "log...
close all the open file handles @throws IOException
[ "close", "all", "the", "open", "file", "handles" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L175-L182
60,695
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.append
public synchronized boolean append(TxnHeader hdr, Record txn) throws IOException { if (hdr != null) { if (hdr.getZxid() <= lastZxidSeen) { LOG.warn("Current zxid " + hdr.getZxid() + " is <= " + lastZxidSeen + " for " + hdr.g...
java
public synchronized boolean append(TxnHeader hdr, Record txn) throws IOException { if (hdr != null) { if (hdr.getZxid() <= lastZxidSeen) { LOG.warn("Current zxid " + hdr.getZxid() + " is <= " + lastZxidSeen + " for " + hdr.g...
[ "public", "synchronized", "boolean", "append", "(", "TxnHeader", "hdr", ",", "Record", "txn", ")", "throws", "IOException", "{", "if", "(", "hdr", "!=", "null", ")", "{", "if", "(", "hdr", ".", "getZxid", "(", ")", "<=", "lastZxidSeen", ")", "{", "LOG"...
append an entry to the transaction log @param hdr the header of the transaction @param txn the transaction part of the entry returns true iff something appended, otw false
[ "append", "an", "entry", "to", "the", "transaction", "log" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L190-L229
60,696
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.padFile
private void padFile(FileOutputStream out) throws IOException { currentSize = Util.padLogFile(out, currentSize, preAllocSize); }
java
private void padFile(FileOutputStream out) throws IOException { currentSize = Util.padLogFile(out, currentSize, preAllocSize); }
[ "private", "void", "padFile", "(", "FileOutputStream", "out", ")", "throws", "IOException", "{", "currentSize", "=", "Util", ".", "padLogFile", "(", "out", ",", "currentSize", ",", "preAllocSize", ")", ";", "}" ]
pad the current file to increase its size @param out the outputstream to be padded @throws IOException
[ "pad", "the", "current", "file", "to", "increase", "its", "size" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L236-L238
60,697
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.getLogFiles
public static File[] getLogFiles(File[] logDirList,long snapshotZxid) { List<File> files = Util.sortDataDir(logDirList, "log", true); long logZxid = 0; // Find the log file that starts before or at the same time as the // zxid of the snapshot for (File f : files) { lo...
java
public static File[] getLogFiles(File[] logDirList,long snapshotZxid) { List<File> files = Util.sortDataDir(logDirList, "log", true); long logZxid = 0; // Find the log file that starts before or at the same time as the // zxid of the snapshot for (File f : files) { lo...
[ "public", "static", "File", "[", "]", "getLogFiles", "(", "File", "[", "]", "logDirList", ",", "long", "snapshotZxid", ")", "{", "List", "<", "File", ">", "files", "=", "Util", ".", "sortDataDir", "(", "logDirList", ",", "\"log\"", ",", "true", ")", ";...
Find the log file that starts at, or just before, the snapshot. Return this and all subsequent logs. Results are ordered by zxid of file, ascending order. @param logDirList array of files @param snapshotZxid return files at, or before this zxid @return
[ "Find", "the", "log", "file", "that", "starts", "at", "or", "just", "before", "the", "snapshot", ".", "Return", "this", "and", "all", "subsequent", "logs", ".", "Results", "are", "ordered", "by", "zxid", "of", "file", "ascending", "order", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L248-L274
60,698
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.getLastLoggedZxid
public long getLastLoggedZxid() { File[] files = getLogFiles(logDir.listFiles(), 0); long maxLog=files.length>0? Util.getZxidFromName(files[files.length-1].getName(),"log"):-1; // if a log file is more recent we must scan it to find // the highest zxid long zxid ...
java
public long getLastLoggedZxid() { File[] files = getLogFiles(logDir.listFiles(), 0); long maxLog=files.length>0? Util.getZxidFromName(files[files.length-1].getName(),"log"):-1; // if a log file is more recent we must scan it to find // the highest zxid long zxid ...
[ "public", "long", "getLastLoggedZxid", "(", ")", "{", "File", "[", "]", "files", "=", "getLogFiles", "(", "logDir", ".", "listFiles", "(", ")", ",", "0", ")", ";", "long", "maxLog", "=", "files", ".", "length", ">", "0", "?", "Util", ".", "getZxidFro...
get the last zxid that was logged in the transaction logs @return the last zxid logged in the transaction logs
[ "get", "the", "last", "zxid", "that", "was", "logged", "in", "the", "transaction", "logs" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L280-L301
60,699
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java
FileTxnLog.commit
public synchronized void commit() throws IOException { if (logStream != null) { logStream.flush(); } for (FileOutputStream log : streamsToFlush) { log.flush(); if (forceSync) { log.getChannel().force(false); } } whil...
java
public synchronized void commit() throws IOException { if (logStream != null) { logStream.flush(); } for (FileOutputStream log : streamsToFlush) { log.flush(); if (forceSync) { log.getChannel().force(false); } } whil...
[ "public", "synchronized", "void", "commit", "(", ")", "throws", "IOException", "{", "if", "(", "logStream", "!=", "null", ")", "{", "logStream", ".", "flush", "(", ")", ";", "}", "for", "(", "FileOutputStream", "log", ":", "streamsToFlush", ")", "{", "lo...
commit the logs. make sure that evertyhing hits the disk
[ "commit", "the", "logs", ".", "make", "sure", "that", "evertyhing", "hits", "the", "disk" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/FileTxnLog.java#L307-L320