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,500 | sannies/mp4parser | muxer/src/main/java/org/mp4parser/muxer/builder/SyncSampleIntersectFinderImpl.java | SyncSampleIntersectFinderImpl.getSyncSamplesTimestamps | public static List<long[]> getSyncSamplesTimestamps(Movie movie, Track track) {
List<long[]> times = new LinkedList<long[]>();
for (Track currentTrack : movie.getTracks()) {
if (currentTrack.getHandler().equals(track.getHandler())) {
long[] currentTrackSyncSamples = currentTr... | java | public static List<long[]> getSyncSamplesTimestamps(Movie movie, Track track) {
List<long[]> times = new LinkedList<long[]>();
for (Track currentTrack : movie.getTracks()) {
if (currentTrack.getHandler().equals(track.getHandler())) {
long[] currentTrackSyncSamples = currentTr... | [
"public",
"static",
"List",
"<",
"long",
"[",
"]",
">",
"getSyncSamplesTimestamps",
"(",
"Movie",
"movie",
",",
"Track",
"track",
")",
"{",
"List",
"<",
"long",
"[",
"]",
">",
"times",
"=",
"new",
"LinkedList",
"<",
"long",
"[",
"]",
">",
"(",
")",
... | Calculates the timestamp of all tracks' sync samples.
@param movie <code>track</code> is located in this movie
@param track get this track's samples timestamps
@return a list of timestamps | [
"Calculates",
"the",
"timestamp",
"of",
"all",
"tracks",
"sync",
"samples",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/muxer/src/main/java/org/mp4parser/muxer/builder/SyncSampleIntersectFinderImpl.java#L94-L106 |
60,501 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/iso14496/part12/CompositionTimeToSample.java | CompositionTimeToSample.blowupCompositionTimes | public static int[] blowupCompositionTimes(List<CompositionTimeToSample.Entry> entries) {
long numOfSamples = 0;
for (CompositionTimeToSample.Entry entry : entries) {
numOfSamples += entry.getCount();
}
assert numOfSamples <= Integer.MAX_VALUE;
int[] decodingTime = ne... | java | public static int[] blowupCompositionTimes(List<CompositionTimeToSample.Entry> entries) {
long numOfSamples = 0;
for (CompositionTimeToSample.Entry entry : entries) {
numOfSamples += entry.getCount();
}
assert numOfSamples <= Integer.MAX_VALUE;
int[] decodingTime = ne... | [
"public",
"static",
"int",
"[",
"]",
"blowupCompositionTimes",
"(",
"List",
"<",
"CompositionTimeToSample",
".",
"Entry",
">",
"entries",
")",
"{",
"long",
"numOfSamples",
"=",
"0",
";",
"for",
"(",
"CompositionTimeToSample",
".",
"Entry",
"entry",
":",
"entri... | Decompresses the list of entries and returns the list of composition times.
@param entries composition time to sample entries in compressed form
@return decoding time per sample | [
"Decompresses",
"the",
"list",
"of",
"entries",
"and",
"returns",
"the",
"list",
"of",
"composition",
"times",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/iso14496/part12/CompositionTimeToSample.java#L58-L76 |
60,502 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/tools/IsoTypeReader.java | IsoTypeReader.readString | public static String readString(ByteBuffer byteBuffer) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
int read;
while ((read = byteBuffer.get()) != 0) {
out.write(read);
}
return Utf8.convert(out.toByteArray());
} | java | public static String readString(ByteBuffer byteBuffer) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
int read;
while ((read = byteBuffer.get()) != 0) {
out.write(read);
}
return Utf8.convert(out.toByteArray());
} | [
"public",
"static",
"String",
"readString",
"(",
"ByteBuffer",
"byteBuffer",
")",
"{",
"ByteArrayOutputStream",
"out",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"int",
"read",
";",
"while",
"(",
"(",
"read",
"=",
"byteBuffer",
".",
"get",
"(",
")",... | Reads a zero terminated UTF-8 string.
@param byteBuffer the data source
@return the string readByte
@throws Error in case of an error in the underlying stream | [
"Reads",
"a",
"zero",
"terminated",
"UTF",
"-",
"8",
"string",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/tools/IsoTypeReader.java#L81-L89 |
60,503 | sannies/mp4parser | streaming/src/main/java/org/mp4parser/streaming/output/mp4/StandardMp4Writer.java | StandardMp4Writer.isChunkReady | protected boolean isChunkReady(StreamingTrack streamingTrack, StreamingSample next) {
long ts = nextSampleStartTime.get(streamingTrack);
long cfst = nextChunkCreateStartTime.get(streamingTrack);
return (ts >= cfst + 2 * streamingTrack.getTimescale());
// chunk interleave of 2 seconds
... | java | protected boolean isChunkReady(StreamingTrack streamingTrack, StreamingSample next) {
long ts = nextSampleStartTime.get(streamingTrack);
long cfst = nextChunkCreateStartTime.get(streamingTrack);
return (ts >= cfst + 2 * streamingTrack.getTimescale());
// chunk interleave of 2 seconds
... | [
"protected",
"boolean",
"isChunkReady",
"(",
"StreamingTrack",
"streamingTrack",
",",
"StreamingSample",
"next",
")",
"{",
"long",
"ts",
"=",
"nextSampleStartTime",
".",
"get",
"(",
"streamingTrack",
")",
";",
"long",
"cfst",
"=",
"nextChunkCreateStartTime",
".",
... | Tests if the currently received samples for a given track
are already a 'chunk' as we want to have it. The next
sample will not be part of the chunk
will be added to the fragment buffer later.
@param streamingTrack track to test
@param next the lastest samples
@return true if a chunk is to b e created. | [
"Tests",
"if",
"the",
"currently",
"received",
"samples",
"for",
"a",
"given",
"track",
"are",
"already",
"a",
"chunk",
"as",
"we",
"want",
"to",
"have",
"it",
".",
"The",
"next",
"sample",
"will",
"not",
"be",
"part",
"of",
"the",
"chunk",
"will",
"be... | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/streaming/src/main/java/org/mp4parser/streaming/output/mp4/StandardMp4Writer.java#L181-L187 |
60,504 | sannies/mp4parser | streaming/src/main/java/org/mp4parser/streaming/output/mp4/FragmentedMp4Writer.java | FragmentedMp4Writer.isFragmentReady | protected boolean isFragmentReady(StreamingTrack streamingTrack, StreamingSample next) {
long ts = nextSampleStartTime.get(streamingTrack);
long cfst = nextFragmentCreateStartTime.get(streamingTrack);
if ((ts > cfst + 3 * streamingTrack.getTimescale())) {
// mininum fragment length ... | java | protected boolean isFragmentReady(StreamingTrack streamingTrack, StreamingSample next) {
long ts = nextSampleStartTime.get(streamingTrack);
long cfst = nextFragmentCreateStartTime.get(streamingTrack);
if ((ts > cfst + 3 * streamingTrack.getTimescale())) {
// mininum fragment length ... | [
"protected",
"boolean",
"isFragmentReady",
"(",
"StreamingTrack",
"streamingTrack",
",",
"StreamingSample",
"next",
")",
"{",
"long",
"ts",
"=",
"nextSampleStartTime",
".",
"get",
"(",
"streamingTrack",
")",
";",
"long",
"cfst",
"=",
"nextFragmentCreateStartTime",
"... | Tests if the currently received samples for a given track
form a valid fragment taking the latest received sample into
account. The next sample is not part of the segment and
will be added to the fragment buffer later.
@param streamingTrack track to test
@param next the lastest samples
@return true if a frag... | [
"Tests",
"if",
"the",
"currently",
"received",
"samples",
"for",
"a",
"given",
"track",
"form",
"a",
"valid",
"fragment",
"taking",
"the",
"latest",
"received",
"sample",
"into",
"account",
".",
"The",
"next",
"sample",
"is",
"not",
"part",
"of",
"the",
"s... | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/streaming/src/main/java/org/mp4parser/streaming/output/mp4/FragmentedMp4Writer.java#L299-L314 |
60,505 | sannies/mp4parser | muxer/src/main/java/org/mp4parser/muxer/builder/FragmentedMp4Builder.java | FragmentedMp4Builder.getSampleSizes | protected long[] getSampleSizes(long startSample, long endSample, Track track, int sequenceNumber) {
List<Sample> samples = getSamples(startSample, endSample, track);
long[] sampleSizes = new long[samples.size()];
for (int i = 0; i < sampleSizes.length; i++) {
sampleSizes[i] = sampl... | java | protected long[] getSampleSizes(long startSample, long endSample, Track track, int sequenceNumber) {
List<Sample> samples = getSamples(startSample, endSample, track);
long[] sampleSizes = new long[samples.size()];
for (int i = 0; i < sampleSizes.length; i++) {
sampleSizes[i] = sampl... | [
"protected",
"long",
"[",
"]",
"getSampleSizes",
"(",
"long",
"startSample",
",",
"long",
"endSample",
",",
"Track",
"track",
",",
"int",
"sequenceNumber",
")",
"{",
"List",
"<",
"Sample",
">",
"samples",
"=",
"getSamples",
"(",
"startSample",
",",
"endSampl... | Gets the sizes of a sequence of samples.
@param startSample low endpoint (inclusive) of the sample sequence
@param endSample high endpoint (exclusive) of the sample sequence
@param track source of the samples
@param sequenceNumber the fragment index of the requested list of samples
@return the sample ... | [
"Gets",
"the",
"sizes",
"of",
"a",
"sequence",
"of",
"samples",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/muxer/src/main/java/org/mp4parser/muxer/builder/FragmentedMp4Builder.java#L377-L385 |
60,506 | sannies/mp4parser | muxer/src/main/java/org/mp4parser/muxer/builder/FragmentedMp4Builder.java | FragmentedMp4Builder.createMoof | protected ParsableBox createMoof(long startSample, long endSample, Track track, int sequenceNumber) {
MovieFragmentBox moof = new MovieFragmentBox();
createMfhd(startSample, endSample, track, sequenceNumber, moof);
createTraf(startSample, endSample, track, sequenceNumber, moof);
TrackRu... | java | protected ParsableBox createMoof(long startSample, long endSample, Track track, int sequenceNumber) {
MovieFragmentBox moof = new MovieFragmentBox();
createMfhd(startSample, endSample, track, sequenceNumber, moof);
createTraf(startSample, endSample, track, sequenceNumber, moof);
TrackRu... | [
"protected",
"ParsableBox",
"createMoof",
"(",
"long",
"startSample",
",",
"long",
"endSample",
",",
"Track",
"track",
",",
"int",
"sequenceNumber",
")",
"{",
"MovieFragmentBox",
"moof",
"=",
"new",
"MovieFragmentBox",
"(",
")",
";",
"createMfhd",
"(",
"startSam... | Creates a 'moof' box for a given sequence of samples.
@param startSample low endpoint (inclusive) of the sample sequence
@param endSample high endpoint (exclusive) of the sample sequence
@param track source of the samples
@param sequenceNumber the fragment index of the requested list of samples
@retur... | [
"Creates",
"a",
"moof",
"box",
"for",
"a",
"given",
"sequence",
"of",
"samples",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/muxer/src/main/java/org/mp4parser/muxer/builder/FragmentedMp4Builder.java#L498-L508 |
60,507 | sannies/mp4parser | muxer/src/main/java/org/mp4parser/muxer/builder/FragmentedMp4Builder.java | FragmentedMp4Builder.createMvhd | protected ParsableBox createMvhd(Movie movie) {
MovieHeaderBox mvhd = new MovieHeaderBox();
mvhd.setVersion(1);
mvhd.setCreationTime(getDate());
mvhd.setModificationTime(getDate());
mvhd.setDuration(0);//no duration in moov for fragmented movies
long movieTimeScale = movi... | java | protected ParsableBox createMvhd(Movie movie) {
MovieHeaderBox mvhd = new MovieHeaderBox();
mvhd.setVersion(1);
mvhd.setCreationTime(getDate());
mvhd.setModificationTime(getDate());
mvhd.setDuration(0);//no duration in moov for fragmented movies
long movieTimeScale = movi... | [
"protected",
"ParsableBox",
"createMvhd",
"(",
"Movie",
"movie",
")",
"{",
"MovieHeaderBox",
"mvhd",
"=",
"new",
"MovieHeaderBox",
"(",
")",
";",
"mvhd",
".",
"setVersion",
"(",
"1",
")",
";",
"mvhd",
".",
"setCreationTime",
"(",
"getDate",
"(",
")",
")",
... | Creates a single 'mvhd' movie header box for a given movie.
@param movie the concerned movie
@return an 'mvhd' box | [
"Creates",
"a",
"single",
"mvhd",
"movie",
"header",
"box",
"for",
"a",
"given",
"movie",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/muxer/src/main/java/org/mp4parser/muxer/builder/FragmentedMp4Builder.java#L516-L531 |
60,508 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/support/AbstractBox.java | AbstractBox.parseDetails | public synchronized final void parseDetails() {
LOG.debug("parsing details of {}", this.getType());
if (content != null) {
ByteBuffer content = this.content;
isParsed = true;
content.rewind();
_parseDetails(content);
if (content.remaining() > 0... | java | public synchronized final void parseDetails() {
LOG.debug("parsing details of {}", this.getType());
if (content != null) {
ByteBuffer content = this.content;
isParsed = true;
content.rewind();
_parseDetails(content);
if (content.remaining() > 0... | [
"public",
"synchronized",
"final",
"void",
"parseDetails",
"(",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"parsing details of {}\"",
",",
"this",
".",
"getType",
"(",
")",
")",
";",
"if",
"(",
"content",
"!=",
"null",
")",
"{",
"ByteBuffer",
"content",
"=",
... | Parses the raw content of the box. It surrounds the actual parsing
which is done | [
"Parses",
"the",
"raw",
"content",
"of",
"the",
"box",
".",
"It",
"surrounds",
"the",
"actual",
"parsing",
"which",
"is",
"done"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/support/AbstractBox.java#L134-L147 |
60,509 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/support/AbstractBox.java | AbstractBox.getSize | public long getSize() {
long size = isParsed ? getContentSize() : content.limit();
size += (8 + // size|type
(size >= ((1L << 32) - 8) ? 8 : 0) + // 32bit - 8 byte size and type
(UserBox.TYPE.equals(getType()) ? 16 : 0));
size += (deadBytes == null ? 0 : deadBytes... | java | public long getSize() {
long size = isParsed ? getContentSize() : content.limit();
size += (8 + // size|type
(size >= ((1L << 32) - 8) ? 8 : 0) + // 32bit - 8 byte size and type
(UserBox.TYPE.equals(getType()) ? 16 : 0));
size += (deadBytes == null ? 0 : deadBytes... | [
"public",
"long",
"getSize",
"(",
")",
"{",
"long",
"size",
"=",
"isParsed",
"?",
"getContentSize",
"(",
")",
":",
"content",
".",
"limit",
"(",
")",
";",
"size",
"+=",
"(",
"8",
"+",
"// size|type",
"(",
"size",
">=",
"(",
"(",
"1L",
"<<",
"32",
... | Gets the full size of the box including header and content.
@return the box's size | [
"Gets",
"the",
"full",
"size",
"of",
"the",
"box",
"including",
"header",
"and",
"content",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/support/AbstractBox.java#L155-L162 |
60,510 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/support/AbstractBox.java | AbstractBox.verify | private boolean verify(ByteBuffer content) {
ByteBuffer bb = ByteBuffer.allocate(l2i(getContentSize() + (deadBytes != null ? deadBytes.limit() : 0)));
getContent(bb);
if (deadBytes != null) {
deadBytes.rewind();
while (deadBytes.remaining() > 0) {
bb.put(d... | java | private boolean verify(ByteBuffer content) {
ByteBuffer bb = ByteBuffer.allocate(l2i(getContentSize() + (deadBytes != null ? deadBytes.limit() : 0)));
getContent(bb);
if (deadBytes != null) {
deadBytes.rewind();
while (deadBytes.remaining() > 0) {
bb.put(d... | [
"private",
"boolean",
"verify",
"(",
"ByteBuffer",
"content",
")",
"{",
"ByteBuffer",
"bb",
"=",
"ByteBuffer",
".",
"allocate",
"(",
"l2i",
"(",
"getContentSize",
"(",
")",
"+",
"(",
"deadBytes",
"!=",
"null",
"?",
"deadBytes",
".",
"limit",
"(",
")",
":... | Verifies that a box can be reconstructed byte-exact after parsing.
@param content the raw content of the box
@return <code>true</code> if raw content exactly matches the reconstructed content | [
"Verifies",
"that",
"a",
"box",
"can",
"be",
"reconstructed",
"byte",
"-",
"exact",
"after",
"parsing",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/support/AbstractBox.java#L190-L224 |
60,511 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/iso14496/part1/objectdescriptors/ExtensionDescriptor.java | ExtensionDescriptor.allTags | static int[] allTags() {
int[] ints = new int[0xFE - 0x6A];
for (int i = 0x6A; i < 0xFE; i++) {
final int pos = i - 0x6A;
LOG.trace("pos: {}", pos);
ints[pos] = i;
}
return ints;
} | java | static int[] allTags() {
int[] ints = new int[0xFE - 0x6A];
for (int i = 0x6A; i < 0xFE; i++) {
final int pos = i - 0x6A;
LOG.trace("pos: {}", pos);
ints[pos] = i;
}
return ints;
} | [
"static",
"int",
"[",
"]",
"allTags",
"(",
")",
"{",
"int",
"[",
"]",
"ints",
"=",
"new",
"int",
"[",
"0xFE",
"-",
"0x6A",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0x6A",
";",
"i",
"<",
"0xFE",
";",
"i",
"++",
")",
"{",
"final",
"int",
"pos"... | ExtDescrTagEndRange = 0xFE | [
"ExtDescrTagEndRange",
"=",
"0xFE"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/iso14496/part1/objectdescriptors/ExtensionDescriptor.java#L50-L59 |
60,512 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java | XtraBox.getAllTagNames | public String[] getAllTagNames() {
String names[] = new String[tags.size()];
for (int i = 0; i < tags.size(); i++) {
XtraTag tag = tags.elementAt(i);
names[i] = tag.tagName;
}
return names;
} | java | public String[] getAllTagNames() {
String names[] = new String[tags.size()];
for (int i = 0; i < tags.size(); i++) {
XtraTag tag = tags.elementAt(i);
names[i] = tag.tagName;
}
return names;
} | [
"public",
"String",
"[",
"]",
"getAllTagNames",
"(",
")",
"{",
"String",
"names",
"[",
"]",
"=",
"new",
"String",
"[",
"tags",
".",
"size",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tags",
".",
"size",
"(",
")",
";... | Returns a list of the tag names present in this Xtra Box
@return Possibly empty (zero length) array of tag names present | [
"Returns",
"a",
"list",
"of",
"the",
"tag",
"names",
"present",
"in",
"this",
"Xtra",
"Box"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java#L196-L203 |
60,513 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java | XtraBox.getFirstStringValue | public String getFirstStringValue(String name) {
Object objs[] = getValues(name);
for (Object obj : objs) {
if (obj instanceof String) {
return (String) obj;
}
}
return null;
} | java | public String getFirstStringValue(String name) {
Object objs[] = getValues(name);
for (Object obj : objs) {
if (obj instanceof String) {
return (String) obj;
}
}
return null;
} | [
"public",
"String",
"getFirstStringValue",
"(",
"String",
"name",
")",
"{",
"Object",
"objs",
"[",
"]",
"=",
"getValues",
"(",
"name",
")",
";",
"for",
"(",
"Object",
"obj",
":",
"objs",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"String",
")",
"{",
"... | Returns the first String value found for this tag
@param name Tag name
@return First String value found | [
"Returns",
"the",
"first",
"String",
"value",
"found",
"for",
"this",
"tag"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java#L211-L219 |
60,514 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java | XtraBox.getFirstDateValue | public Date getFirstDateValue(String name) {
Object objs[] = getValues(name);
for (Object obj : objs) {
if (obj instanceof Date) {
return (Date) obj;
}
}
return null;
} | java | public Date getFirstDateValue(String name) {
Object objs[] = getValues(name);
for (Object obj : objs) {
if (obj instanceof Date) {
return (Date) obj;
}
}
return null;
} | [
"public",
"Date",
"getFirstDateValue",
"(",
"String",
"name",
")",
"{",
"Object",
"objs",
"[",
"]",
"=",
"getValues",
"(",
"name",
")",
";",
"for",
"(",
"Object",
"obj",
":",
"objs",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"Date",
")",
"{",
"return... | Returns the first Date value found for this tag
@param name Tag name
@return First Date value found | [
"Returns",
"the",
"first",
"Date",
"value",
"found",
"for",
"this",
"tag"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java#L227-L235 |
60,515 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java | XtraBox.getFirstLongValue | public Long getFirstLongValue(String name) {
Object objs[] = getValues(name);
for (Object obj : objs) {
if (obj instanceof Long) {
return (Long) obj;
}
}
return null;
} | java | public Long getFirstLongValue(String name) {
Object objs[] = getValues(name);
for (Object obj : objs) {
if (obj instanceof Long) {
return (Long) obj;
}
}
return null;
} | [
"public",
"Long",
"getFirstLongValue",
"(",
"String",
"name",
")",
"{",
"Object",
"objs",
"[",
"]",
"=",
"getValues",
"(",
"name",
")",
";",
"for",
"(",
"Object",
"obj",
":",
"objs",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"Long",
")",
"{",
"return... | Returns the first Long value found for this tag
@param name Tag name
@return First long value found | [
"Returns",
"the",
"first",
"Long",
"value",
"found",
"for",
"this",
"tag"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java#L243-L251 |
60,516 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java | XtraBox.getValues | public Object[] getValues(String name) {
XtraTag tag = getTagByName(name);
Object values[];
if (tag != null) {
values = new Object[tag.values.size()];
for (int i = 0; i < tag.values.size(); i++) {
values[i] = tag.values.elementAt(i).getValueAsObject();
... | java | public Object[] getValues(String name) {
XtraTag tag = getTagByName(name);
Object values[];
if (tag != null) {
values = new Object[tag.values.size()];
for (int i = 0; i < tag.values.size(); i++) {
values[i] = tag.values.elementAt(i).getValueAsObject();
... | [
"public",
"Object",
"[",
"]",
"getValues",
"(",
"String",
"name",
")",
"{",
"XtraTag",
"tag",
"=",
"getTagByName",
"(",
"name",
")",
";",
"Object",
"values",
"[",
"]",
";",
"if",
"(",
"tag",
"!=",
"null",
")",
"{",
"values",
"=",
"new",
"Object",
"... | Returns an array of values for this tag. Empty array when tag is not present
@param name Tag name to retrieve
@return Possibly empty array of values (possible types are String, Long, Date and byte[] ) | [
"Returns",
"an",
"array",
"of",
"values",
"for",
"this",
"tag",
".",
"Empty",
"array",
"when",
"tag",
"is",
"not",
"present"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java#L259-L271 |
60,517 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java | XtraBox.setTagValues | public void setTagValues(String name, String values[]) {
removeTag(name);
XtraTag tag = new XtraTag(name);
for (int i = 0; i < values.length; i++) {
tag.values.addElement(new XtraValue(values[i]));
}
tags.addElement(tag);
} | java | public void setTagValues(String name, String values[]) {
removeTag(name);
XtraTag tag = new XtraTag(name);
for (int i = 0; i < values.length; i++) {
tag.values.addElement(new XtraValue(values[i]));
}
tags.addElement(tag);
} | [
"public",
"void",
"setTagValues",
"(",
"String",
"name",
",",
"String",
"values",
"[",
"]",
")",
"{",
"removeTag",
"(",
"name",
")",
";",
"XtraTag",
"tag",
"=",
"new",
"XtraTag",
"(",
"name",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
... | Removes and recreates tag using specified String values
@param name Tag name to replace
@param values New String values | [
"Removes",
"and",
"recreates",
"tag",
"using",
"specified",
"String",
"values"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java#L291-L298 |
60,518 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java | XtraBox.setTagValue | public void setTagValue(String name, Date date) {
removeTag(name);
XtraTag tag = new XtraTag(name);
tag.values.addElement(new XtraValue(date));
tags.addElement(tag);
} | java | public void setTagValue(String name, Date date) {
removeTag(name);
XtraTag tag = new XtraTag(name);
tag.values.addElement(new XtraValue(date));
tags.addElement(tag);
} | [
"public",
"void",
"setTagValue",
"(",
"String",
"name",
",",
"Date",
"date",
")",
"{",
"removeTag",
"(",
"name",
")",
";",
"XtraTag",
"tag",
"=",
"new",
"XtraTag",
"(",
"name",
")",
";",
"tag",
".",
"values",
".",
"addElement",
"(",
"new",
"XtraValue",... | Removes and recreates tag using specified Date value
@param name Tag name to replace
@param date New Date value | [
"Removes",
"and",
"recreates",
"tag",
"using",
"specified",
"Date",
"value"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java#L316-L321 |
60,519 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java | XtraBox.setTagValue | public void setTagValue(String name, long value) {
removeTag(name);
XtraTag tag = new XtraTag(name);
tag.values.addElement(new XtraValue(value));
tags.addElement(tag);
} | java | public void setTagValue(String name, long value) {
removeTag(name);
XtraTag tag = new XtraTag(name);
tag.values.addElement(new XtraValue(value));
tags.addElement(tag);
} | [
"public",
"void",
"setTagValue",
"(",
"String",
"name",
",",
"long",
"value",
")",
"{",
"removeTag",
"(",
"name",
")",
";",
"XtraTag",
"tag",
"=",
"new",
"XtraTag",
"(",
"name",
")",
";",
"tag",
".",
"values",
".",
"addElement",
"(",
"new",
"XtraValue"... | Removes and recreates tag using specified Long value
@param name Tag name to replace
@param value New Long value | [
"Removes",
"and",
"recreates",
"tag",
"using",
"specified",
"Long",
"value"
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/microsoft/XtraBox.java#L329-L334 |
60,520 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/iso14496/part12/SampleToChunkBox.java | SampleToChunkBox.blowup | public long[] blowup(int chunkCount) {
long[] numberOfSamples = new long[chunkCount];
int j = 0;
List<SampleToChunkBox.Entry> sampleToChunkEntries = new LinkedList<Entry>(entries);
Collections.reverse(sampleToChunkEntries);
Iterator<Entry> iterator = sampleToChunkEntries.iterator... | java | public long[] blowup(int chunkCount) {
long[] numberOfSamples = new long[chunkCount];
int j = 0;
List<SampleToChunkBox.Entry> sampleToChunkEntries = new LinkedList<Entry>(entries);
Collections.reverse(sampleToChunkEntries);
Iterator<Entry> iterator = sampleToChunkEntries.iterator... | [
"public",
"long",
"[",
"]",
"blowup",
"(",
"int",
"chunkCount",
")",
"{",
"long",
"[",
"]",
"numberOfSamples",
"=",
"new",
"long",
"[",
"chunkCount",
"]",
";",
"int",
"j",
"=",
"0",
";",
"List",
"<",
"SampleToChunkBox",
".",
"Entry",
">",
"sampleToChun... | Decompresses the list of entries and returns the number of samples per chunk for
every single chunk.
@param chunkCount overall number of chunks
@return number of samples per chunk | [
"Decompresses",
"the",
"list",
"of",
"entries",
"and",
"returns",
"the",
"number",
"of",
"samples",
"per",
"chunk",
"for",
"every",
"single",
"chunk",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/iso14496/part12/SampleToChunkBox.java#L89-L105 |
60,521 | sannies/mp4parser | isoparser/src/main/java/org/mp4parser/boxes/iso14496/part12/TimeToSampleBox.java | TimeToSampleBox.blowupTimeToSamples | public static synchronized long[] blowupTimeToSamples(List<TimeToSampleBox.Entry> entries) {
SoftReference<long[]> cacheEntry;
if ((cacheEntry = cache.get(entries)) != null) {
long[] cacheVal;
if ((cacheVal = cacheEntry.get()) != null) {
return cacheVal;
... | java | public static synchronized long[] blowupTimeToSamples(List<TimeToSampleBox.Entry> entries) {
SoftReference<long[]> cacheEntry;
if ((cacheEntry = cache.get(entries)) != null) {
long[] cacheVal;
if ((cacheVal = cacheEntry.get()) != null) {
return cacheVal;
... | [
"public",
"static",
"synchronized",
"long",
"[",
"]",
"blowupTimeToSamples",
"(",
"List",
"<",
"TimeToSampleBox",
".",
"Entry",
">",
"entries",
")",
"{",
"SoftReference",
"<",
"long",
"[",
"]",
">",
"cacheEntry",
";",
"if",
"(",
"(",
"cacheEntry",
"=",
"ca... | Decompresses the list of entries and returns the list of decoding times.
@param entries compressed entries
@return decoding time per sample | [
"Decompresses",
"the",
"list",
"of",
"entries",
"and",
"returns",
"the",
"list",
"of",
"decoding",
"times",
"."
] | 3382ff5d489363900f352a8da0f794a20ad3b063 | https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/isoparser/src/main/java/org/mp4parser/boxes/iso14496/part12/TimeToSampleBox.java#L58-L83 |
60,522 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/eventbus/SubscriberRegistry.java | SubscriberRegistry.register | void register(Object listener) {
Multimap<Class<?>, Subscriber> listenerMethods = findAllSubscribers(listener);
for (Map.Entry<Class<?>, Collection<Subscriber>> entry : listenerMethods.asMap().entrySet()) {
Class<?> eventType = entry.getKey();
Collection<Subscriber> eventMethodsInListener = entry.g... | java | void register(Object listener) {
Multimap<Class<?>, Subscriber> listenerMethods = findAllSubscribers(listener);
for (Map.Entry<Class<?>, Collection<Subscriber>> entry : listenerMethods.asMap().entrySet()) {
Class<?> eventType = entry.getKey();
Collection<Subscriber> eventMethodsInListener = entry.g... | [
"void",
"register",
"(",
"Object",
"listener",
")",
"{",
"Multimap",
"<",
"Class",
"<",
"?",
">",
",",
"Subscriber",
">",
"listenerMethods",
"=",
"findAllSubscribers",
"(",
"listener",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"Class",
"<",
"?",
... | Registers all subscriber methods on the given listener object. | [
"Registers",
"all",
"subscriber",
"methods",
"on",
"the",
"given",
"listener",
"object",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/eventbus/SubscriberRegistry.java#L76-L93 |
60,523 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.deleteRow | public int deleteRow() {
// build the delete string
String deleteString = "DELETE FROM " + tableName
+ this.generatePKWhere();
PreparedStatement ps = null;
// System.out.println("delete string "+deleteString);
try {
// fill the questio... | java | public int deleteRow() {
// build the delete string
String deleteString = "DELETE FROM " + tableName
+ this.generatePKWhere();
PreparedStatement ps = null;
// System.out.println("delete string "+deleteString);
try {
// fill the questio... | [
"public",
"int",
"deleteRow",
"(",
")",
"{",
"// build the delete string",
"String",
"deleteString",
"=",
"\"DELETE FROM \"",
"+",
"tableName",
"+",
"this",
".",
"generatePKWhere",
"(",
")",
";",
"PreparedStatement",
"ps",
"=",
"null",
";",
"// System.out.println(\"... | delete current row, answer special action codes, see comment below | [
"delete",
"current",
"row",
"answer",
"special",
"action",
"codes",
"see",
"comment",
"below"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L142-L261 |
60,524 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.getPrimaryKeysString | public String getPrimaryKeysString() {
String result = "";
for (int i = 0; i < primaryKeys.length; i++) {
if (result != "") {
result += ", ";
}
result += primaryKeys[i];
} // end of for (int i=0; i<primaryKeys.length; i++)
return... | java | public String getPrimaryKeysString() {
String result = "";
for (int i = 0; i < primaryKeys.length; i++) {
if (result != "") {
result += ", ";
}
result += primaryKeys[i];
} // end of for (int i=0; i<primaryKeys.length; i++)
return... | [
"public",
"String",
"getPrimaryKeysString",
"(",
")",
"{",
"String",
"result",
"=",
"\"\"",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"primaryKeys",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"result",
"!=",
"\"\"",
")",
"{",
... | answer a String containing a String list of primary keys i. e. "pk1, pk2, pk3" | [
"answer",
"a",
"String",
"containing",
"a",
"String",
"list",
"of",
"primary",
"keys",
"i",
".",
"e",
".",
"pk1",
"pk2",
"pk3"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L264-L277 |
60,525 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.insertNewRow | public void insertNewRow() {
// reset all fields
for (int i = 0; i < komponente.length; i++) {
komponente[i].clearContent();
} // end of for (int i=0; i<komponente.length; i++)
// reset the field for the primary keys
for (int i = 0; i < primaryKeys.length; i++) {... | java | public void insertNewRow() {
// reset all fields
for (int i = 0; i < komponente.length; i++) {
komponente[i].clearContent();
} // end of for (int i=0; i<komponente.length; i++)
// reset the field for the primary keys
for (int i = 0; i < primaryKeys.length; i++) {... | [
"public",
"void",
"insertNewRow",
"(",
")",
"{",
"// reset all fields",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"komponente",
".",
"length",
";",
"i",
"++",
")",
"{",
"komponente",
"[",
"i",
"]",
".",
"clearContent",
"(",
")",
";",
"}",
"/... | open the panel to insert a new row into the table | [
"open",
"the",
"panel",
"to",
"insert",
"a",
"new",
"row",
"into",
"the",
"table"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L280-L293 |
60,526 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.saveChanges | public boolean saveChanges() {
// the initial settings of the textfields counts with one
// so a real change by the user needs as many changes as there are columns
// System.out.print("Anderungen in den Feldern: ");
// there are changes to the database
// memorize all columns wh... | java | public boolean saveChanges() {
// the initial settings of the textfields counts with one
// so a real change by the user needs as many changes as there are columns
// System.out.print("Anderungen in den Feldern: ");
// there are changes to the database
// memorize all columns wh... | [
"public",
"boolean",
"saveChanges",
"(",
")",
"{",
"// the initial settings of the textfields counts with one",
"// so a real change by the user needs as many changes as there are columns",
"// System.out.print(\"Anderungen in den Feldern: \");",
"// there are changes to the database",
"// memor... | answer true, if the update succeeds | [
"answer",
"true",
"if",
"the",
"update",
"succeeds"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L327-L400 |
60,527 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.saveNewRow | public boolean saveNewRow() {
// check the fields of the primary keys whether one is empty
boolean onePKempty = false;
int tmp;
PreparedStatement ps = null;
for (tmp = 0; tmp < primaryKeys.length; tmp++) {
if (komponente[pkColIndex[tmp]].getC... | java | public boolean saveNewRow() {
// check the fields of the primary keys whether one is empty
boolean onePKempty = false;
int tmp;
PreparedStatement ps = null;
for (tmp = 0; tmp < primaryKeys.length; tmp++) {
if (komponente[pkColIndex[tmp]].getC... | [
"public",
"boolean",
"saveNewRow",
"(",
")",
"{",
"// check the fields of the primary keys whether one is empty",
"boolean",
"onePKempty",
"=",
"false",
";",
"int",
"tmp",
";",
"PreparedStatement",
"ps",
"=",
"null",
";",
"for",
"(",
"tmp",
"=",
"0",
";",
"tmp",
... | answer true, if saving succeeds | [
"answer",
"true",
"if",
"saving",
"succeeds"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L404-L470 |
60,528 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.searchRows | public int searchRows(String[] words, boolean allWords,
boolean ignoreCase, boolean noMatchWhole) {
// System.out.print("search in " + tableName + " for: ");
// for (int i=0; i < words.length; i++) {
// System.out.print(words[i]+", ");
// }
// Sy... | java | public int searchRows(String[] words, boolean allWords,
boolean ignoreCase, boolean noMatchWhole) {
// System.out.print("search in " + tableName + " for: ");
// for (int i=0; i < words.length; i++) {
// System.out.print(words[i]+", ");
// }
// Sy... | [
"public",
"int",
"searchRows",
"(",
"String",
"[",
"]",
"words",
",",
"boolean",
"allWords",
",",
"boolean",
"ignoreCase",
",",
"boolean",
"noMatchWhole",
")",
"{",
"// System.out.print(\"search in \" + tableName + \" for: \");",
"// for (int i=0; i < words.length; i++) {",
... | answer the number of found rows, -1 if there is an SQL exception | [
"answer",
"the",
"number",
"of",
"found",
"rows",
"-",
"1",
"if",
"there",
"is",
"an",
"SQL",
"exception"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L475-L548 |
60,529 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.disablePKFields | private void disablePKFields() {
for (int i = 0; i < primaryKeys.length; i++) {
komponente[pkColIndex[i]].setEditable(false);
} // end of for (int i=0; i<columns.length; i++)
} | java | private void disablePKFields() {
for (int i = 0; i < primaryKeys.length; i++) {
komponente[pkColIndex[i]].setEditable(false);
} // end of for (int i=0; i<columns.length; i++)
} | [
"private",
"void",
"disablePKFields",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"primaryKeys",
".",
"length",
";",
"i",
"++",
")",
"{",
"komponente",
"[",
"pkColIndex",
"[",
"i",
"]",
"]",
".",
"setEditable",
"(",
"false",
")"... | set all fields for primary keys to not editable | [
"set",
"all",
"fields",
"for",
"primary",
"keys",
"to",
"not",
"editable"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L578-L583 |
60,530 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.fillZChoice | private void fillZChoice(ZaurusChoice zc, String tab, String col) {
Statement stmt = null;
try {
if (cConn == null) {
return;
}
stmt = cConn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM " + tab
... | java | private void fillZChoice(ZaurusChoice zc, String tab, String col) {
Statement stmt = null;
try {
if (cConn == null) {
return;
}
stmt = cConn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM " + tab
... | [
"private",
"void",
"fillZChoice",
"(",
"ZaurusChoice",
"zc",
",",
"String",
"tab",
",",
"String",
"col",
")",
"{",
"Statement",
"stmt",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"cConn",
"==",
"null",
")",
"{",
"return",
";",
"}",
"stmt",
"=",
"cConn"... | and the column values as values | [
"and",
"the",
"column",
"values",
"as",
"values"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L588-L629 |
60,531 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.fetchColumns | private void fetchColumns() {
Vector temp = new Vector(20);
Vector tempType = new Vector(20);
try {
if (cConn == null) {
return;
}
if (dbmeta == null) {
dbmeta = cConn.getMetaData();
}
ResultSet c... | java | private void fetchColumns() {
Vector temp = new Vector(20);
Vector tempType = new Vector(20);
try {
if (cConn == null) {
return;
}
if (dbmeta == null) {
dbmeta = cConn.getMetaData();
}
ResultSet c... | [
"private",
"void",
"fetchColumns",
"(",
")",
"{",
"Vector",
"temp",
"=",
"new",
"Vector",
"(",
"20",
")",
";",
"Vector",
"tempType",
"=",
"new",
"Vector",
"(",
"20",
")",
";",
"try",
"{",
"if",
"(",
"cConn",
"==",
"null",
")",
"{",
"return",
";",
... | fetch all column names | [
"fetch",
"all",
"column",
"names"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L632-L667 |
60,532 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.generateWhere | private String generateWhere(String[] words, boolean allWords,
boolean ignoreCase, boolean noMatchWhole) {
String result = "";
// if all words must match use AND between the different conditions
String join;
if (allWords) {
join = " AND ";
... | java | private String generateWhere(String[] words, boolean allWords,
boolean ignoreCase, boolean noMatchWhole) {
String result = "";
// if all words must match use AND between the different conditions
String join;
if (allWords) {
join = " AND ";
... | [
"private",
"String",
"generateWhere",
"(",
"String",
"[",
"]",
"words",
",",
"boolean",
"allWords",
",",
"boolean",
"ignoreCase",
",",
"boolean",
"noMatchWhole",
")",
"{",
"String",
"result",
"=",
"\"\"",
";",
"// if all words must match use AND between the different ... | generate the Where-condition for the words | [
"generate",
"the",
"Where",
"-",
"condition",
"for",
"the",
"words"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L807-L861 |
60,533 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.getColIndex | private int getColIndex(String name) {
for (int i = 0; i < columns.length; i++) {
if (name.equals(columns[i])) {
return i;
} // end of if (name.equals(columns[i]))
} // end of for (int i=0; i<columns.length; i++)
return -1;
} | java | private int getColIndex(String name) {
for (int i = 0; i < columns.length; i++) {
if (name.equals(columns[i])) {
return i;
} // end of if (name.equals(columns[i]))
} // end of for (int i=0; i<columns.length; i++)
return -1;
} | [
"private",
"int",
"getColIndex",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"columns",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"name",
".",
"equals",
"(",
"columns",
"[",
"i",
"]",
")",
")",
... | answer the index of the column named name in the actual table | [
"answer",
"the",
"index",
"of",
"the",
"column",
"named",
"name",
"in",
"the",
"actual",
"table"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L864-L873 |
60,534 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.getColIndex | private int getColIndex(String colName, String tabName) {
int ordPos = 0;
try {
if (cConn == null) {
return -1;
}
if (dbmeta == null) {
dbmeta = cConn.getMetaData();
}
ResultSet colList = dbmeta.getColumns(nu... | java | private int getColIndex(String colName, String tabName) {
int ordPos = 0;
try {
if (cConn == null) {
return -1;
}
if (dbmeta == null) {
dbmeta = cConn.getMetaData();
}
ResultSet colList = dbmeta.getColumns(nu... | [
"private",
"int",
"getColIndex",
"(",
"String",
"colName",
",",
"String",
"tabName",
")",
"{",
"int",
"ordPos",
"=",
"0",
";",
"try",
"{",
"if",
"(",
"cConn",
"==",
"null",
")",
"{",
"return",
"-",
"1",
";",
"}",
"if",
"(",
"dbmeta",
"==",
"null",
... | answer the index of the column named colName in the table tabName | [
"answer",
"the",
"index",
"of",
"the",
"column",
"named",
"colName",
"in",
"the",
"table",
"tabName"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L876-L902 |
60,535 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.getConstraintIndex | private int getConstraintIndex(int colIndex) {
for (int i = 0; i < imColIndex.length; i++) {
for (int j = 0; j < imColIndex[i].length; j++) {
if (colIndex == imColIndex[i][j]) {
return i;
} // end of if (col == imColIndex[i][j])
} ... | java | private int getConstraintIndex(int colIndex) {
for (int i = 0; i < imColIndex.length; i++) {
for (int j = 0; j < imColIndex[i].length; j++) {
if (colIndex == imColIndex[i][j]) {
return i;
} // end of if (col == imColIndex[i][j])
} ... | [
"private",
"int",
"getConstraintIndex",
"(",
"int",
"colIndex",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"imColIndex",
".",
"length",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"imColIndex",
"[",
... | answer -1, if the column is not part of any constraint | [
"answer",
"-",
"1",
"if",
"the",
"column",
"is",
"not",
"part",
"of",
"any",
"constraint"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L906-L917 |
60,536 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.showAktRow | private void showAktRow() {
try {
pStmt.clearParameters();
for (int i = 0; i < primaryKeys.length; i++) {
pStmt.setObject(i + 1, resultRowPKs[aktRowNr][i]);
} // end of for (int i=0; i<primaryKeys.length; i++)
ResultSet rs = pStmt.executeQuer... | java | private void showAktRow() {
try {
pStmt.clearParameters();
for (int i = 0; i < primaryKeys.length; i++) {
pStmt.setObject(i + 1, resultRowPKs[aktRowNr][i]);
} // end of for (int i=0; i<primaryKeys.length; i++)
ResultSet rs = pStmt.executeQuer... | [
"private",
"void",
"showAktRow",
"(",
")",
"{",
"try",
"{",
"pStmt",
".",
"clearParameters",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"primaryKeys",
".",
"length",
";",
"i",
"++",
")",
"{",
"pStmt",
".",
"setObject",
"(",
"... | get and show the values of the actual row in the GUI | [
"get",
"and",
"show",
"the",
"values",
"of",
"the",
"actual",
"row",
"in",
"the",
"GUI"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L982-L1007 |
60,537 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionArithmetic.java | ExpressionArithmetic.voltConvertBinaryLiteralOperandsToBigint | private void voltConvertBinaryLiteralOperandsToBigint() {
// Strange that CONCAT is an arithmetic operator.
// You could imagine using it for VARBINARY, so
// definitely don't convert its operands to BIGINT!
assert(opType != OpTypes.CONCAT);
for (int i = 0; i < nodes.length; ++i... | java | private void voltConvertBinaryLiteralOperandsToBigint() {
// Strange that CONCAT is an arithmetic operator.
// You could imagine using it for VARBINARY, so
// definitely don't convert its operands to BIGINT!
assert(opType != OpTypes.CONCAT);
for (int i = 0; i < nodes.length; ++i... | [
"private",
"void",
"voltConvertBinaryLiteralOperandsToBigint",
"(",
")",
"{",
"// Strange that CONCAT is an arithmetic operator.",
"// You could imagine using it for VARBINARY, so",
"// definitely don't convert its operands to BIGINT!",
"assert",
"(",
"opType",
"!=",
"OpTypes",
".",
"C... | A VoltDB extension to use X'..' as a numeric value | [
"A",
"VoltDB",
"extension",
"to",
"use",
"X",
"..",
"as",
"a",
"numeric",
"value"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionArithmetic.java#L446-L456 |
60,538 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariable.java | RangeVariable.findColumn | public int findColumn(String tableName, String columnName) {
// The namedJoinColumnExpressions are ExpressionColumn objects
// for columns named in USING conditions. Each range variable
// has a possibly empty list of these. If two range variables are
// operands of a join with a USING... | java | public int findColumn(String tableName, String columnName) {
// The namedJoinColumnExpressions are ExpressionColumn objects
// for columns named in USING conditions. Each range variable
// has a possibly empty list of these. If two range variables are
// operands of a join with a USING... | [
"public",
"int",
"findColumn",
"(",
"String",
"tableName",
",",
"String",
"columnName",
")",
"{",
"// The namedJoinColumnExpressions are ExpressionColumn objects",
"// for columns named in USING conditions. Each range variable",
"// has a possibly empty list of these. If two range variab... | Returns the index for the column given the column's table name
and column name. If the table name is null, there is no table
name specified. For example, in a query "select C from T" there
is no table name, so tableName would be null. In the query
"select T.C from T" tableName would be the string "T". Don't
return ... | [
"Returns",
"the",
"index",
"for",
"the",
"column",
"given",
"the",
"column",
"s",
"table",
"name",
"and",
"column",
"name",
".",
"If",
"the",
"table",
"name",
"is",
"null",
"there",
"is",
"no",
"table",
"name",
"specified",
".",
"For",
"example",
"in",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariable.java#L244-L283 |
60,539 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariable.java | RangeVariable.addIndexCondition | void addIndexCondition(Expression[] exprList, Index index, int colCount,
boolean isJoin) {
// VoltDB extension
if (rangeIndex == index && isJoinIndex && (!isJoin) &&
(multiColumnCount > 0) && (colCount == 0)) {
// This is one particular set of conditions wh... | java | void addIndexCondition(Expression[] exprList, Index index, int colCount,
boolean isJoin) {
// VoltDB extension
if (rangeIndex == index && isJoinIndex && (!isJoin) &&
(multiColumnCount > 0) && (colCount == 0)) {
// This is one particular set of conditions wh... | [
"void",
"addIndexCondition",
"(",
"Expression",
"[",
"]",
"exprList",
",",
"Index",
"index",
",",
"int",
"colCount",
",",
"boolean",
"isJoin",
")",
"{",
"// VoltDB extension",
"if",
"(",
"rangeIndex",
"==",
"index",
"&&",
"isJoinIndex",
"&&",
"(",
"!",
"isJo... | Only multiple EQUAL conditions are used
@param exprList list of expressions
@param index Index to use
@param isJoin whether a join or not | [
"Only",
"multiple",
"EQUAL",
"conditions",
"are",
"used"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariable.java#L548-L575 |
60,540 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/HsqlNameManager.java | HsqlNameManager.getSubqueryTableName | public HsqlName getSubqueryTableName() {
HsqlName hsqlName = new HsqlName(this, SqlInvariants.SYSTEM_SUBQUERY,
false, SchemaObject.TABLE);
hsqlName.schema = SqlInvariants.SYSTEM_SCHEMA_HSQLNAME;
return hsqlName;
} | java | public HsqlName getSubqueryTableName() {
HsqlName hsqlName = new HsqlName(this, SqlInvariants.SYSTEM_SUBQUERY,
false, SchemaObject.TABLE);
hsqlName.schema = SqlInvariants.SYSTEM_SCHEMA_HSQLNAME;
return hsqlName;
} | [
"public",
"HsqlName",
"getSubqueryTableName",
"(",
")",
"{",
"HsqlName",
"hsqlName",
"=",
"new",
"HsqlName",
"(",
"this",
",",
"SqlInvariants",
".",
"SYSTEM_SUBQUERY",
",",
"false",
",",
"SchemaObject",
".",
"TABLE",
")",
";",
"hsqlName",
".",
"schema",
"=",
... | Same name string but different objects and serial number | [
"Same",
"name",
"string",
"but",
"different",
"objects",
"and",
"serial",
"number"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HsqlNameManager.java#L187-L195 |
60,541 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/HsqlNameManager.java | HsqlNameManager.getAutoColumnName | static public HsqlName getAutoColumnName(int i) {
if (i < autoColumnNames.length) {
return autoColumnNames[i];
}
return new HsqlName(staticManager, makeAutoColumnName("C_", i), 0, false);
} | java | static public HsqlName getAutoColumnName(int i) {
if (i < autoColumnNames.length) {
return autoColumnNames[i];
}
return new HsqlName(staticManager, makeAutoColumnName("C_", i), 0, false);
} | [
"static",
"public",
"HsqlName",
"getAutoColumnName",
"(",
"int",
"i",
")",
"{",
"if",
"(",
"i",
"<",
"autoColumnNames",
".",
"length",
")",
"{",
"return",
"autoColumnNames",
"[",
"i",
"]",
";",
"}",
"return",
"new",
"HsqlName",
"(",
"staticManager",
",",
... | Column index i is 0 based, returns 1 based numbered column. | [
"Column",
"index",
"i",
"is",
"0",
"based",
"returns",
"1",
"based",
"numbered",
"column",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HsqlNameManager.java#L212-L219 |
60,542 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/RefCapablePropertyResourceBundle.java | RefCapablePropertyResourceBundle.getString | public String getString(String key) {
String value = wrappedBundle.getString(key);
if (value.length() < 1) {
value = getStringFromFile(key);
// For conciseness and sanity, get rid of all \r's so that \n
// will definitively be our line breaks.
if (value.in... | java | public String getString(String key) {
String value = wrappedBundle.getString(key);
if (value.length() < 1) {
value = getStringFromFile(key);
// For conciseness and sanity, get rid of all \r's so that \n
// will definitively be our line breaks.
if (value.in... | [
"public",
"String",
"getString",
"(",
"String",
"key",
")",
"{",
"String",
"value",
"=",
"wrappedBundle",
".",
"getString",
"(",
"key",
")",
";",
"if",
"(",
"value",
".",
"length",
"(",
")",
"<",
"1",
")",
"{",
"value",
"=",
"getStringFromFile",
"(",
... | Returns value defined in this RefCapablePropertyResourceBundle's
.properties file, unless that value is empty.
If the value in the .properties file is empty, then this returns
the entire contents of the referenced text file.
@see ResourceBundle#getString(String) | [
"Returns",
"value",
"defined",
"in",
"this",
"RefCapablePropertyResourceBundle",
"s",
".",
"properties",
"file",
"unless",
"that",
"value",
"is",
"empty",
".",
"If",
"the",
"value",
"in",
"the",
".",
"properties",
"file",
"is",
"empty",
"then",
"this",
"return... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/RefCapablePropertyResourceBundle.java#L309-L322 |
60,543 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/RefCapablePropertyResourceBundle.java | RefCapablePropertyResourceBundle.getRef | static private RefCapablePropertyResourceBundle getRef(String baseName,
ResourceBundle rb, ClassLoader loader) {
if (!(rb instanceof PropertyResourceBundle))
throw new MissingResourceException(
"Found a Resource Bundle, but it is a "
+ rb.g... | java | static private RefCapablePropertyResourceBundle getRef(String baseName,
ResourceBundle rb, ClassLoader loader) {
if (!(rb instanceof PropertyResourceBundle))
throw new MissingResourceException(
"Found a Resource Bundle, but it is a "
+ rb.g... | [
"static",
"private",
"RefCapablePropertyResourceBundle",
"getRef",
"(",
"String",
"baseName",
",",
"ResourceBundle",
"rb",
",",
"ClassLoader",
"loader",
")",
"{",
"if",
"(",
"!",
"(",
"rb",
"instanceof",
"PropertyResourceBundle",
")",
")",
"throw",
"new",
"Missing... | Return a ref to a new or existing RefCapablePropertyResourceBundle,
or throw a MissingResourceException. | [
"Return",
"a",
"ref",
"to",
"a",
"new",
"or",
"existing",
"RefCapablePropertyResourceBundle",
"or",
"throw",
"a",
"MissingResourceException",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/RefCapablePropertyResourceBundle.java#L364-L378 |
60,544 | VoltDB/voltdb | src/frontend/org/voltdb/planner/microoptimizations/ReplaceWithIndexLimit.java | ReplaceWithIndexLimit.checkPureColumnIndex | private static boolean checkPureColumnIndex(Index index, int aggCol, List<AbstractExpression> filterExprs) {
boolean found = false;
// all left child of filterExprs must be of type TupleValueExpression in equality comparison
for (AbstractExpression expr : filterExprs) {
if (expr.ge... | java | private static boolean checkPureColumnIndex(Index index, int aggCol, List<AbstractExpression> filterExprs) {
boolean found = false;
// all left child of filterExprs must be of type TupleValueExpression in equality comparison
for (AbstractExpression expr : filterExprs) {
if (expr.ge... | [
"private",
"static",
"boolean",
"checkPureColumnIndex",
"(",
"Index",
"index",
",",
"int",
"aggCol",
",",
"List",
"<",
"AbstractExpression",
">",
"filterExprs",
")",
"{",
"boolean",
"found",
"=",
"false",
";",
"// all left child of filterExprs must be of type TupleValue... | or all filters compose the complete set of prefix key components | [
"or",
"all",
"filters",
"compose",
"the",
"complete",
"set",
"of",
"prefix",
"key",
"components"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/microoptimizations/ReplaceWithIndexLimit.java#L416-L445 |
60,545 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.writeHashinatorConfig | public static Runnable writeHashinatorConfig(
InstanceId instId,
String path,
String nonce,
int hostId,
HashinatorSnapshotData hashData,
boolean isTruncationSnapshot)
throws IOException
{
final File file = new VoltFile(path, constructHashinatorConfigFilena... | java | public static Runnable writeHashinatorConfig(
InstanceId instId,
String path,
String nonce,
int hostId,
HashinatorSnapshotData hashData,
boolean isTruncationSnapshot)
throws IOException
{
final File file = new VoltFile(path, constructHashinatorConfigFilena... | [
"public",
"static",
"Runnable",
"writeHashinatorConfig",
"(",
"InstanceId",
"instId",
",",
"String",
"path",
",",
"String",
"nonce",
",",
"int",
"hostId",
",",
"HashinatorSnapshotData",
"hashData",
",",
"boolean",
"isTruncationSnapshot",
")",
"throws",
"IOException",
... | Write the hashinator config file for a snapshot
@param instId instance ID
@param path path to which snapshot files will be written
@param nonce nonce used to distinguish this snapshot
@param hostId host ID where this is happening
@param hashData serialized hash configuration data
@return Runnable objec... | [
"Write",
"the",
"hashinator",
"config",
"file",
"for",
"a",
"snapshot"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L272-L332 |
60,546 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.parseNonceFromDigestFilename | public static String parseNonceFromDigestFilename(String filename) {
if (filename == null || !filename.endsWith(".digest")) {
throw new IllegalArgumentException("Bad digest filename: " + filename);
}
return parseNonceFromSnapshotFilename(filename);
} | java | public static String parseNonceFromDigestFilename(String filename) {
if (filename == null || !filename.endsWith(".digest")) {
throw new IllegalArgumentException("Bad digest filename: " + filename);
}
return parseNonceFromSnapshotFilename(filename);
} | [
"public",
"static",
"String",
"parseNonceFromDigestFilename",
"(",
"String",
"filename",
")",
"{",
"if",
"(",
"filename",
"==",
"null",
"||",
"!",
"filename",
".",
"endsWith",
"(",
"\".digest\"",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
... | Get the nonce from the filename of the digest file.
@param filename The filename of the digest file
@return The nonce | [
"Get",
"the",
"nonce",
"from",
"the",
"filename",
"of",
"the",
"digest",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L339-L345 |
60,547 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.parseNonceFromHashinatorConfigFilename | public static String parseNonceFromHashinatorConfigFilename(String filename) {
if (filename == null || !filename.endsWith(HASH_EXTENSION)) {
throw new IllegalArgumentException("Bad hashinator config filename: " + filename);
}
return parseNonceFromSnapshotFilename(filename);
} | java | public static String parseNonceFromHashinatorConfigFilename(String filename) {
if (filename == null || !filename.endsWith(HASH_EXTENSION)) {
throw new IllegalArgumentException("Bad hashinator config filename: " + filename);
}
return parseNonceFromSnapshotFilename(filename);
} | [
"public",
"static",
"String",
"parseNonceFromHashinatorConfigFilename",
"(",
"String",
"filename",
")",
"{",
"if",
"(",
"filename",
"==",
"null",
"||",
"!",
"filename",
".",
"endsWith",
"(",
"HASH_EXTENSION",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentExceptio... | Get the nonce from the filename of the hashinator config file.
@param filename The filename of the hashinator config file
@return The nonce | [
"Get",
"the",
"nonce",
"from",
"the",
"filename",
"of",
"the",
"hashinator",
"config",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L352-L358 |
60,548 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.parseNonceFromSnapshotFilename | public static String parseNonceFromSnapshotFilename(String filename)
{
if (filename == null) {
throw new IllegalArgumentException("Bad snapshot filename: " + filename);
}
// For the snapshot catalog
if (filename.endsWith(".jar")) {
return filename.substring(0... | java | public static String parseNonceFromSnapshotFilename(String filename)
{
if (filename == null) {
throw new IllegalArgumentException("Bad snapshot filename: " + filename);
}
// For the snapshot catalog
if (filename.endsWith(".jar")) {
return filename.substring(0... | [
"public",
"static",
"String",
"parseNonceFromSnapshotFilename",
"(",
"String",
"filename",
")",
"{",
"if",
"(",
"filename",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Bad snapshot filename: \"",
"+",
"filename",
")",
";",
"}",
"// ... | Get the nonce from any snapshot-related file. | [
"Get",
"the",
"nonce",
"from",
"any",
"snapshot",
"-",
"related",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L363-L387 |
60,549 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.retrieveHashinatorConfigs | public static List<ByteBuffer> retrieveHashinatorConfigs(
String path,
String nonce,
int maxConfigs,
VoltLogger logger) throws IOException
{
VoltFile directory = new VoltFile(path);
ArrayList<ByteBuffer> configs = new ArrayList<ByteBuffer>();
if (directory.list... | java | public static List<ByteBuffer> retrieveHashinatorConfigs(
String path,
String nonce,
int maxConfigs,
VoltLogger logger) throws IOException
{
VoltFile directory = new VoltFile(path);
ArrayList<ByteBuffer> configs = new ArrayList<ByteBuffer>();
if (directory.list... | [
"public",
"static",
"List",
"<",
"ByteBuffer",
">",
"retrieveHashinatorConfigs",
"(",
"String",
"path",
",",
"String",
"nonce",
",",
"int",
"maxConfigs",
",",
"VoltLogger",
"logger",
")",
"throws",
"IOException",
"{",
"VoltFile",
"directory",
"=",
"new",
"VoltFi... | Read hashinator snapshots into byte buffers.
@param path base snapshot path
@param nonce unique snapshot name
@param maxConfigs max number of good configs to return (0 for all)
@param logger log writer
@return byte buffers for each host
@throws IOException | [
"Read",
"hashinator",
"snapshots",
"into",
"byte",
"buffers",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L417-L450 |
60,550 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.writeSnapshotCatalog | public static Runnable writeSnapshotCatalog(String path, String nonce, boolean isTruncationSnapshot)
throws IOException
{
String filename = SnapshotUtil.constructCatalogFilenameForNonce(nonce);
try
{
return VoltDB.instance().getCatalogContext().writeCatalogJarToFile(path, fil... | java | public static Runnable writeSnapshotCatalog(String path, String nonce, boolean isTruncationSnapshot)
throws IOException
{
String filename = SnapshotUtil.constructCatalogFilenameForNonce(nonce);
try
{
return VoltDB.instance().getCatalogContext().writeCatalogJarToFile(path, fil... | [
"public",
"static",
"Runnable",
"writeSnapshotCatalog",
"(",
"String",
"path",
",",
"String",
"nonce",
",",
"boolean",
"isTruncationSnapshot",
")",
"throws",
"IOException",
"{",
"String",
"filename",
"=",
"SnapshotUtil",
".",
"constructCatalogFilenameForNonce",
"(",
"... | Write the current catalog associated with the database snapshot
to the snapshot location | [
"Write",
"the",
"current",
"catalog",
"associated",
"with",
"the",
"database",
"snapshot",
"to",
"the",
"snapshot",
"location"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L456-L474 |
60,551 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.writeTerminusMarker | public static Runnable writeTerminusMarker(final String nonce, final NodeSettings paths, final VoltLogger logger) {
final File f = new File(paths.getVoltDBRoot(), VoltDB.TERMINUS_MARKER);
return new Runnable() {
@Override
public void run() {
try(PrintWriter pw = n... | java | public static Runnable writeTerminusMarker(final String nonce, final NodeSettings paths, final VoltLogger logger) {
final File f = new File(paths.getVoltDBRoot(), VoltDB.TERMINUS_MARKER);
return new Runnable() {
@Override
public void run() {
try(PrintWriter pw = n... | [
"public",
"static",
"Runnable",
"writeTerminusMarker",
"(",
"final",
"String",
"nonce",
",",
"final",
"NodeSettings",
"paths",
",",
"final",
"VoltLogger",
"logger",
")",
"{",
"final",
"File",
"f",
"=",
"new",
"File",
"(",
"paths",
".",
"getVoltDBRoot",
"(",
... | Write the shutdown save snapshot terminus marker | [
"Write",
"the",
"shutdown",
"save",
"snapshot",
"terminus",
"marker"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L509-L521 |
60,552 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.retrieveSnapshotFiles | public static void retrieveSnapshotFiles(
File directory,
Map<String, Snapshot> namedSnapshotMap,
FileFilter filter,
boolean validate,
SnapshotPathType stype,
VoltLogger logger) {
NamedSnapshots namedSnapshots = new NamedSnapshots(namedSna... | java | public static void retrieveSnapshotFiles(
File directory,
Map<String, Snapshot> namedSnapshotMap,
FileFilter filter,
boolean validate,
SnapshotPathType stype,
VoltLogger logger) {
NamedSnapshots namedSnapshots = new NamedSnapshots(namedSna... | [
"public",
"static",
"void",
"retrieveSnapshotFiles",
"(",
"File",
"directory",
",",
"Map",
"<",
"String",
",",
"Snapshot",
">",
"namedSnapshotMap",
",",
"FileFilter",
"filter",
",",
"boolean",
"validate",
",",
"SnapshotPathType",
"stype",
",",
"VoltLogger",
"logge... | Spider the provided directory applying the provided FileFilter. Optionally validate snapshot
files. Return a summary of partition counts, partition information, files, digests etc.
that can be used to determine if a valid restore plan exists.
@param directory
@param snapshots
@param filter
@param validate | [
"Spider",
"the",
"provided",
"directory",
"applying",
"the",
"provided",
"FileFilter",
".",
"Optionally",
"validate",
"snapshot",
"files",
".",
"Return",
"a",
"summary",
"of",
"partition",
"counts",
"partition",
"information",
"files",
"digests",
"etc",
".",
"that... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L799-L809 |
60,553 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.constructFilenameForTable | public static final String constructFilenameForTable(Table table,
String fileNonce,
SnapshotFormat format,
int hostId)
{
String extension... | java | public static final String constructFilenameForTable(Table table,
String fileNonce,
SnapshotFormat format,
int hostId)
{
String extension... | [
"public",
"static",
"final",
"String",
"constructFilenameForTable",
"(",
"Table",
"table",
",",
"String",
"fileNonce",
",",
"SnapshotFormat",
"format",
",",
"int",
"hostId",
")",
"{",
"String",
"extension",
"=",
"\".vpt\"",
";",
"if",
"(",
"format",
"==",
"Sna... | Generates a Filename to the snapshot file for the given table.
@param table
@param fileNonce
@param hostId | [
"Generates",
"a",
"Filename",
"to",
"the",
"snapshot",
"file",
"for",
"the",
"given",
"table",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L1207-L1227 |
60,554 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.requestSnapshot | public static void requestSnapshot(final long clientHandle,
final String path,
final String nonce,
final boolean blocking,
final SnapshotFormat format,
... | java | public static void requestSnapshot(final long clientHandle,
final String path,
final String nonce,
final boolean blocking,
final SnapshotFormat format,
... | [
"public",
"static",
"void",
"requestSnapshot",
"(",
"final",
"long",
"clientHandle",
",",
"final",
"String",
"path",
",",
"final",
"String",
"nonce",
",",
"final",
"boolean",
"blocking",
",",
"final",
"SnapshotFormat",
"format",
",",
"final",
"SnapshotPathType",
... | Request a new snapshot. It will retry for a couple of times. If it
doesn't succeed in the specified time, an error response will be sent to
the response handler, otherwise a success response will be passed to the
handler.
The request process runs in a separate thread, this method call will
return immediately.
@param ... | [
"Request",
"a",
"new",
"snapshot",
".",
"It",
"will",
"retry",
"for",
"a",
"couple",
"of",
"times",
".",
"If",
"it",
"doesn",
"t",
"succeed",
"in",
"the",
"specified",
"time",
"an",
"error",
"response",
"will",
"be",
"sent",
"to",
"the",
"response",
"h... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L1433-L1518 |
60,555 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.watchSnapshot | public static ListenableFuture<SnapshotCompletionInterest.SnapshotCompletionEvent>
watchSnapshot(final String nonce)
{
final SettableFuture<SnapshotCompletionInterest.SnapshotCompletionEvent> result =
SettableFuture.create();
SnapshotCompletionInterest interest = new SnapshotComplet... | java | public static ListenableFuture<SnapshotCompletionInterest.SnapshotCompletionEvent>
watchSnapshot(final String nonce)
{
final SettableFuture<SnapshotCompletionInterest.SnapshotCompletionEvent> result =
SettableFuture.create();
SnapshotCompletionInterest interest = new SnapshotComplet... | [
"public",
"static",
"ListenableFuture",
"<",
"SnapshotCompletionInterest",
".",
"SnapshotCompletionEvent",
">",
"watchSnapshot",
"(",
"final",
"String",
"nonce",
")",
"{",
"final",
"SettableFuture",
"<",
"SnapshotCompletionInterest",
".",
"SnapshotCompletionEvent",
">",
"... | Watch for the completion of a snapshot
@param nonce The snapshot nonce to watch for
@return A future that will return the SnapshotCompletionEvent | [
"Watch",
"for",
"the",
"completion",
"of",
"a",
"snapshot"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L1546-L1566 |
60,556 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.retrieveHashinatorConfig | public static HashinatorSnapshotData retrieveHashinatorConfig(
String path, String nonce, int hostId, VoltLogger logger) throws IOException {
HashinatorSnapshotData hashData = null;
String expectedFileName = constructHashinatorConfigFilenameForNonce(nonce, hostId);
File[] files = new... | java | public static HashinatorSnapshotData retrieveHashinatorConfig(
String path, String nonce, int hostId, VoltLogger logger) throws IOException {
HashinatorSnapshotData hashData = null;
String expectedFileName = constructHashinatorConfigFilenameForNonce(nonce, hostId);
File[] files = new... | [
"public",
"static",
"HashinatorSnapshotData",
"retrieveHashinatorConfig",
"(",
"String",
"path",
",",
"String",
"nonce",
",",
"int",
"hostId",
",",
"VoltLogger",
"logger",
")",
"throws",
"IOException",
"{",
"HashinatorSnapshotData",
"hashData",
"=",
"null",
";",
"St... | Retrieve hashinator config for restore.
@param path snapshot base directory
@param nonce unique snapshot ID
@param hostId host ID
@return hashinator shapshot data
@throws Exception | [
"Retrieve",
"hashinator",
"config",
"for",
"restore",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L1576-L1594 |
60,557 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java | SnapshotUtil.getRealPath | public static String getRealPath(SnapshotPathType stype, String path) {
if (stype == SnapshotPathType.SNAP_CL) {
return VoltDB.instance().getCommandLogSnapshotPath();
} else if (stype == SnapshotPathType.SNAP_AUTO) {
return VoltDB.instance().getSnapshotPath();
}
r... | java | public static String getRealPath(SnapshotPathType stype, String path) {
if (stype == SnapshotPathType.SNAP_CL) {
return VoltDB.instance().getCommandLogSnapshotPath();
} else if (stype == SnapshotPathType.SNAP_AUTO) {
return VoltDB.instance().getSnapshotPath();
}
r... | [
"public",
"static",
"String",
"getRealPath",
"(",
"SnapshotPathType",
"stype",
",",
"String",
"path",
")",
"{",
"if",
"(",
"stype",
"==",
"SnapshotPathType",
".",
"SNAP_CL",
")",
"{",
"return",
"VoltDB",
".",
"instance",
"(",
")",
".",
"getCommandLogSnapshotPa... | Return path based on type if type is not CL or AUTO return provided path. | [
"Return",
"path",
"based",
"on",
"type",
"if",
"type",
"is",
"not",
"CL",
"or",
"AUTO",
"return",
"provided",
"path",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L1664-L1671 |
60,558 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/LifeTimeConnectionWrapper.java | LifeTimeConnectionWrapper.close | public void close() throws SQLException {
validate();
try {
this.connection.rollback();
this.connection.clearWarnings();
this.connectionDefaults.setDefaults(this.connection);
this.connection.reset();
fireCloseEvent();
} catch (SQLExce... | java | public void close() throws SQLException {
validate();
try {
this.connection.rollback();
this.connection.clearWarnings();
this.connectionDefaults.setDefaults(this.connection);
this.connection.reset();
fireCloseEvent();
} catch (SQLExce... | [
"public",
"void",
"close",
"(",
")",
"throws",
"SQLException",
"{",
"validate",
"(",
")",
";",
"try",
"{",
"this",
".",
"connection",
".",
"rollback",
"(",
")",
";",
"this",
".",
"connection",
".",
"clearWarnings",
"(",
")",
";",
"this",
".",
"connecti... | Rolls the connection back, resets the connection back to defaults, clears warnings,
resets the connection on the server side, and returns the connection to the pool.
@throws SQLException | [
"Rolls",
"the",
"connection",
"back",
"resets",
"the",
"connection",
"back",
"to",
"defaults",
"clears",
"warnings",
"resets",
"the",
"connection",
"on",
"the",
"server",
"side",
"and",
"returns",
"the",
"connection",
"to",
"the",
"pool",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/LifeTimeConnectionWrapper.java#L116-L131 |
60,559 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/LifeTimeConnectionWrapper.java | LifeTimeConnectionWrapper.closePhysically | public void closePhysically() throws SQLException {
SQLException exception = null;
if (!isClosed && this.connection != null
&& !this.connection.isClosed()) {
try {
this.connection.close();
} catch (SQLException e) {
//catch and h... | java | public void closePhysically() throws SQLException {
SQLException exception = null;
if (!isClosed && this.connection != null
&& !this.connection.isClosed()) {
try {
this.connection.close();
} catch (SQLException e) {
//catch and h... | [
"public",
"void",
"closePhysically",
"(",
")",
"throws",
"SQLException",
"{",
"SQLException",
"exception",
"=",
"null",
";",
"if",
"(",
"!",
"isClosed",
"&&",
"this",
".",
"connection",
"!=",
"null",
"&&",
"!",
"this",
".",
"connection",
".",
"isClosed",
"... | Closes the connection physically. The pool is not notified of this.
@throws SQLException If something goes wrong during the closing of the wrapped JDBCConnection. | [
"Closes",
"the",
"connection",
"physically",
".",
"The",
"pool",
"is",
"not",
"notified",
"of",
"this",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/LifeTimeConnectionWrapper.java#L137-L163 |
60,560 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotSiteProcessor.java | SnapshotSiteProcessor.startSnapshotWithTargets | public void startSnapshotWithTargets(Collection<SnapshotDataTarget> targets, long now)
{
// TRAIL [SnapSave:9] 5 [all SP] Start snapshot by putting task into the site queue.
//Basically asserts that there are no tasks with null targets at this point
//getTarget checks and crashes
for... | java | public void startSnapshotWithTargets(Collection<SnapshotDataTarget> targets, long now)
{
// TRAIL [SnapSave:9] 5 [all SP] Start snapshot by putting task into the site queue.
//Basically asserts that there are no tasks with null targets at this point
//getTarget checks and crashes
for... | [
"public",
"void",
"startSnapshotWithTargets",
"(",
"Collection",
"<",
"SnapshotDataTarget",
">",
"targets",
",",
"long",
"now",
")",
"{",
"// TRAIL [SnapSave:9] 5 [all SP] Start snapshot by putting task into the site queue.",
"//Basically asserts that there are no tasks with null targe... | This is called from the snapshot IO thread when the deferred setup is finished. It sets
the data targets and queues a snapshot task onto the site thread. | [
"This",
"is",
"called",
"from",
"the",
"snapshot",
"IO",
"thread",
"when",
"the",
"deferred",
"setup",
"is",
"finished",
".",
"It",
"sets",
"the",
"data",
"targets",
"and",
"queues",
"a",
"snapshot",
"task",
"onto",
"the",
"site",
"thread",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotSiteProcessor.java#L452-L482 |
60,561 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotSiteProcessor.java | SnapshotSiteProcessor.getOutputBuffers | private List<BBContainer> getOutputBuffers(Collection<SnapshotTableTask> tableTasks, boolean noSchedule)
{
final int desired = tableTasks.size();
while (true) {
int available = m_availableSnapshotBuffers.get();
//Limit the number of buffers used concurrently
if (... | java | private List<BBContainer> getOutputBuffers(Collection<SnapshotTableTask> tableTasks, boolean noSchedule)
{
final int desired = tableTasks.size();
while (true) {
int available = m_availableSnapshotBuffers.get();
//Limit the number of buffers used concurrently
if (... | [
"private",
"List",
"<",
"BBContainer",
">",
"getOutputBuffers",
"(",
"Collection",
"<",
"SnapshotTableTask",
">",
"tableTasks",
",",
"boolean",
"noSchedule",
")",
"{",
"final",
"int",
"desired",
"=",
"tableTasks",
".",
"size",
"(",
")",
";",
"while",
"(",
"t... | Create an output buffer for each task.
@return null if there aren't enough buffers left in the pool. | [
"Create",
"an",
"output",
"buffer",
"for",
"each",
"task",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotSiteProcessor.java#L517-L538 |
60,562 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorLinkedList.java | RowSetNavigatorLinkedList.write | public void write(RowOutputInterface out,
ResultMetaData meta) throws IOException {
beforeFirst();
out.writeLong(id);
out.writeInt(size);
out.writeInt(0); // offset
out.writeInt(size);
while (hasNext()) {
Object[] data = getNext();
... | java | public void write(RowOutputInterface out,
ResultMetaData meta) throws IOException {
beforeFirst();
out.writeLong(id);
out.writeInt(size);
out.writeInt(0); // offset
out.writeInt(size);
while (hasNext()) {
Object[] data = getNext();
... | [
"public",
"void",
"write",
"(",
"RowOutputInterface",
"out",
",",
"ResultMetaData",
"meta",
")",
"throws",
"IOException",
"{",
"beforeFirst",
"(",
")",
";",
"out",
".",
"writeLong",
"(",
"id",
")",
";",
"out",
".",
"writeInt",
"(",
"size",
")",
";",
"out... | reading and writing | [
"reading",
"and",
"writing"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorLinkedList.java#L120-L137 |
60,563 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.create | public static ClientInterface create(
HostMessenger messenger,
CatalogContext context,
ReplicationRole replicationRole,
Cartographer cartographer,
InetAddress clientIntf,
int clientPort,
InetAddress adminIntf,
int adminPort,... | java | public static ClientInterface create(
HostMessenger messenger,
CatalogContext context,
ReplicationRole replicationRole,
Cartographer cartographer,
InetAddress clientIntf,
int clientPort,
InetAddress adminIntf,
int adminPort,... | [
"public",
"static",
"ClientInterface",
"create",
"(",
"HostMessenger",
"messenger",
",",
"CatalogContext",
"context",
",",
"ReplicationRole",
"replicationRole",
",",
"Cartographer",
"cartographer",
",",
"InetAddress",
"clientIntf",
",",
"int",
"clientPort",
",",
"InetAd... | Static factory method to easily create a ClientInterface with the default
settings.
@throws Exception | [
"Static",
"factory",
"method",
"to",
"easily",
"create",
"a",
"ClientInterface",
"with",
"the",
"default",
"settings",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L1138-L1157 |
60,564 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.initializeSnapshotDaemon | public void initializeSnapshotDaemon(HostMessenger messenger, GlobalServiceElector gse) {
m_snapshotDaemon.init(this, messenger, new Runnable() {
@Override
public void run() {
bindAdapter(m_snapshotDaemonAdapter, null);
}
},
gse);
} | java | public void initializeSnapshotDaemon(HostMessenger messenger, GlobalServiceElector gse) {
m_snapshotDaemon.init(this, messenger, new Runnable() {
@Override
public void run() {
bindAdapter(m_snapshotDaemonAdapter, null);
}
},
gse);
} | [
"public",
"void",
"initializeSnapshotDaemon",
"(",
"HostMessenger",
"messenger",
",",
"GlobalServiceElector",
"gse",
")",
"{",
"m_snapshotDaemon",
".",
"init",
"(",
"this",
",",
"messenger",
",",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void... | Initializes the snapshot daemon so that it's ready to take snapshots | [
"Initializes",
"the",
"snapshot",
"daemon",
"so",
"that",
"it",
"s",
"ready",
"to",
"take",
"snapshots"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L1386-L1394 |
60,565 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.bindAdapter | public ClientInterfaceHandleManager bindAdapter(final Connection adapter, final ClientInterfaceRepairCallback repairCallback) {
return bindAdapter(adapter, repairCallback, false);
} | java | public ClientInterfaceHandleManager bindAdapter(final Connection adapter, final ClientInterfaceRepairCallback repairCallback) {
return bindAdapter(adapter, repairCallback, false);
} | [
"public",
"ClientInterfaceHandleManager",
"bindAdapter",
"(",
"final",
"Connection",
"adapter",
",",
"final",
"ClientInterfaceRepairCallback",
"repairCallback",
")",
"{",
"return",
"bindAdapter",
"(",
"adapter",
",",
"repairCallback",
",",
"false",
")",
";",
"}"
] | Tell the clientInterface about a connection adapter. | [
"Tell",
"the",
"clientInterface",
"about",
"a",
"connection",
"adapter",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L1399-L1401 |
60,566 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.mayActivateSnapshotDaemon | public void mayActivateSnapshotDaemon() {
SnapshotSchedule schedule = m_catalogContext.get().database.getSnapshotschedule().get("default");
if (schedule != null)
{
final ListenableFuture<Void> future = m_snapshotDaemon.mayGoActiveOrInactive(schedule);
future.addListener(n... | java | public void mayActivateSnapshotDaemon() {
SnapshotSchedule schedule = m_catalogContext.get().database.getSnapshotschedule().get("default");
if (schedule != null)
{
final ListenableFuture<Void> future = m_snapshotDaemon.mayGoActiveOrInactive(schedule);
future.addListener(n... | [
"public",
"void",
"mayActivateSnapshotDaemon",
"(",
")",
"{",
"SnapshotSchedule",
"schedule",
"=",
"m_catalogContext",
".",
"get",
"(",
")",
".",
"database",
".",
"getSnapshotschedule",
"(",
")",
".",
"get",
"(",
"\"default\"",
")",
";",
"if",
"(",
"schedule",... | in the cluster, make our SnapshotDaemon responsible for snapshots | [
"in",
"the",
"cluster",
"make",
"our",
"SnapshotDaemon",
"responsible",
"for",
"snapshots"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L1431-L1449 |
60,567 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.notifyOfCatalogUpdate | public void notifyOfCatalogUpdate() {
m_catalogContext.set(VoltDB.instance().getCatalogContext());
/*
* Update snapshot daemon settings.
*
* Don't do it if the system is still initializing (CL replay),
* because snapshot daemon may call @SnapshotScan on activation and... | java | public void notifyOfCatalogUpdate() {
m_catalogContext.set(VoltDB.instance().getCatalogContext());
/*
* Update snapshot daemon settings.
*
* Don't do it if the system is still initializing (CL replay),
* because snapshot daemon may call @SnapshotScan on activation and... | [
"public",
"void",
"notifyOfCatalogUpdate",
"(",
")",
"{",
"m_catalogContext",
".",
"set",
"(",
"VoltDB",
".",
"instance",
"(",
")",
".",
"getCatalogContext",
"(",
")",
")",
";",
"/*\n * Update snapshot daemon settings.\n *\n * Don't do it if the syst... | Set the flag that tells this client interface to update its
catalog when it's threadsafe. | [
"Set",
"the",
"flag",
"that",
"tells",
"this",
"client",
"interface",
"to",
"update",
"its",
"catalog",
"when",
"it",
"s",
"threadsafe",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L1463-L1483 |
60,568 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.checkForDeadConnections | private final void checkForDeadConnections(final long now) {
final ArrayList<Pair<Connection, Integer>> connectionsToRemove = new ArrayList<Pair<Connection, Integer>>();
for (final ClientInterfaceHandleManager cihm : m_cihm.values()) {
// Internal connections don't implement calculatePending... | java | private final void checkForDeadConnections(final long now) {
final ArrayList<Pair<Connection, Integer>> connectionsToRemove = new ArrayList<Pair<Connection, Integer>>();
for (final ClientInterfaceHandleManager cihm : m_cihm.values()) {
// Internal connections don't implement calculatePending... | [
"private",
"final",
"void",
"checkForDeadConnections",
"(",
"final",
"long",
"now",
")",
"{",
"final",
"ArrayList",
"<",
"Pair",
"<",
"Connection",
",",
"Integer",
">",
">",
"connectionsToRemove",
"=",
"new",
"ArrayList",
"<",
"Pair",
"<",
"Connection",
",",
... | Check for dead connections by providing each connection with the current
time so it can calculate the delta between now and the time the oldest message was
queued for sending.
@param now Current time in milliseconds | [
"Check",
"for",
"dead",
"connections",
"by",
"providing",
"each",
"connection",
"with",
"the",
"current",
"time",
"so",
"it",
"can",
"calculate",
"the",
"delta",
"between",
"now",
"and",
"the",
"time",
"the",
"oldest",
"message",
"was",
"queued",
"for",
"sen... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L1693-L1711 |
60,569 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.shutdown | protected void shutdown() throws InterruptedException {
if (m_deadConnectionFuture != null) {
m_deadConnectionFuture.cancel(false);
try {m_deadConnectionFuture.get();} catch (Throwable t) {}
}
if (m_topologyCheckFuture != null) {
m_topologyCheckFuture.cancel(f... | java | protected void shutdown() throws InterruptedException {
if (m_deadConnectionFuture != null) {
m_deadConnectionFuture.cancel(false);
try {m_deadConnectionFuture.get();} catch (Throwable t) {}
}
if (m_topologyCheckFuture != null) {
m_topologyCheckFuture.cancel(f... | [
"protected",
"void",
"shutdown",
"(",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"m_deadConnectionFuture",
"!=",
"null",
")",
"{",
"m_deadConnectionFuture",
".",
"cancel",
"(",
"false",
")",
";",
"try",
"{",
"m_deadConnectionFuture",
".",
"get",
"(",... | all your read buffers" events .. or something .. | [
"all",
"your",
"read",
"buffers",
"events",
"..",
"or",
"something",
".."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L1717-L1744 |
60,570 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.sendEOLMessage | public void sendEOLMessage(int partitionId) {
final long initiatorHSId = m_cartographer.getHSIdForMaster(partitionId);
Iv2EndOfLogMessage message = new Iv2EndOfLogMessage(partitionId);
m_mailbox.send(initiatorHSId, message);
} | java | public void sendEOLMessage(int partitionId) {
final long initiatorHSId = m_cartographer.getHSIdForMaster(partitionId);
Iv2EndOfLogMessage message = new Iv2EndOfLogMessage(partitionId);
m_mailbox.send(initiatorHSId, message);
} | [
"public",
"void",
"sendEOLMessage",
"(",
"int",
"partitionId",
")",
"{",
"final",
"long",
"initiatorHSId",
"=",
"m_cartographer",
".",
"getHSIdForMaster",
"(",
"partitionId",
")",
";",
"Iv2EndOfLogMessage",
"message",
"=",
"new",
"Iv2EndOfLogMessage",
"(",
"partitio... | Sends an end of log message to the master of that partition. This should
only be called at the end of replay.
@param partitionId | [
"Sends",
"an",
"end",
"of",
"log",
"message",
"to",
"the",
"master",
"of",
"that",
"partition",
".",
"This",
"should",
"only",
"be",
"called",
"at",
"the",
"end",
"of",
"replay",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L2020-L2024 |
60,571 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.getMispartitionedErrorResponse | private ClientResponseImpl getMispartitionedErrorResponse(StoredProcedureInvocation task,
Procedure catProc, Exception ex) {
Object invocationParameter = null;
try {
invocationParameter = task.getParameterAtIndex(catProc.getPartitionparameter());
} catch (Exception ex2) {... | java | private ClientResponseImpl getMispartitionedErrorResponse(StoredProcedureInvocation task,
Procedure catProc, Exception ex) {
Object invocationParameter = null;
try {
invocationParameter = task.getParameterAtIndex(catProc.getPartitionparameter());
} catch (Exception ex2) {... | [
"private",
"ClientResponseImpl",
"getMispartitionedErrorResponse",
"(",
"StoredProcedureInvocation",
"task",
",",
"Procedure",
"catProc",
",",
"Exception",
"ex",
")",
"{",
"Object",
"invocationParameter",
"=",
"null",
";",
"try",
"{",
"invocationParameter",
"=",
"task",... | Generate a mispartitioned response also log the message. | [
"Generate",
"a",
"mispartitioned",
"response",
"also",
"log",
"the",
"message",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L2044-L2065 |
60,572 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.ceaseAllPublicFacingTrafficImmediately | public boolean ceaseAllPublicFacingTrafficImmediately() {
try {
if (m_acceptor != null) {
// This call seems to block until the shutdown is done
// which is good becasue we assume there will be no new
// connections afterward
m_acceptor... | java | public boolean ceaseAllPublicFacingTrafficImmediately() {
try {
if (m_acceptor != null) {
// This call seems to block until the shutdown is done
// which is good becasue we assume there will be no new
// connections afterward
m_acceptor... | [
"public",
"boolean",
"ceaseAllPublicFacingTrafficImmediately",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"m_acceptor",
"!=",
"null",
")",
"{",
"// This call seems to block until the shutdown is done",
"// which is good becasue we assume there will be no new",
"// connections afterward"... | This is not designed to be a safe shutdown.
This is designed to stop sending messages to clients as fast as possible.
It is currently called from VoltDB.crash...
Note: this really needs to work. We CAN'T respond back to the client anything
after we've decided to crash or it might break some of our contracts.
@return ... | [
"This",
"is",
"not",
"designed",
"to",
"be",
"a",
"safe",
"shutdown",
".",
"This",
"is",
"designed",
"to",
"stop",
"sending",
"messages",
"to",
"clients",
"as",
"fast",
"as",
"possible",
".",
"It",
"is",
"currently",
"called",
"from",
"VoltDB",
".",
"cra... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L2120-L2149 |
60,573 | VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.processMigratePartitionLeaderTask | void processMigratePartitionLeaderTask(MigratePartitionLeaderMessage message) {
synchronized(m_lock) {
//start MigratePartitionLeader service
if (message.startMigratingPartitionLeaders()) {
if (m_migratePartitionLeaderExecutor == null) {
m_migrateParti... | java | void processMigratePartitionLeaderTask(MigratePartitionLeaderMessage message) {
synchronized(m_lock) {
//start MigratePartitionLeader service
if (message.startMigratingPartitionLeaders()) {
if (m_migratePartitionLeaderExecutor == null) {
m_migrateParti... | [
"void",
"processMigratePartitionLeaderTask",
"(",
"MigratePartitionLeaderMessage",
"message",
")",
"{",
"synchronized",
"(",
"m_lock",
")",
"{",
"//start MigratePartitionLeader service",
"if",
"(",
"message",
".",
"startMigratingPartitionLeaders",
"(",
")",
")",
"{",
"if"... | start or stop MigratePartitionLeader task | [
"start",
"or",
"stop",
"MigratePartitionLeader",
"task"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L2160-L2183 |
60,574 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/Resume.java | Resume.run | public VoltTable[] run(SystemProcedureExecutionContext ctx) {
// Choose the lowest site ID on this host to actually flip the bit
VoltDBInterface voltdb = VoltDB.instance();
OperationMode opMode = voltdb.getMode();
if (ctx.isLowestSiteId()) {
ZooKeeper zk = voltdb.getHostMess... | java | public VoltTable[] run(SystemProcedureExecutionContext ctx) {
// Choose the lowest site ID on this host to actually flip the bit
VoltDBInterface voltdb = VoltDB.instance();
OperationMode opMode = voltdb.getMode();
if (ctx.isLowestSiteId()) {
ZooKeeper zk = voltdb.getHostMess... | [
"public",
"VoltTable",
"[",
"]",
"run",
"(",
"SystemProcedureExecutionContext",
"ctx",
")",
"{",
"// Choose the lowest site ID on this host to actually flip the bit",
"VoltDBInterface",
"voltdb",
"=",
"VoltDB",
".",
"instance",
"(",
")",
";",
"OperationMode",
"opMode",
"=... | Exit admin mode
@param ctx Internal parameter. Not user-accessible.
@return Standard STATUS table. | [
"Exit",
"admin",
"mode"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/Resume.java#L61-L106 |
60,575 | VoltDB/voltdb | src/frontend/org/voltdb/NativeLibraryLoader.java | NativeLibraryLoader.getNativeLibraryFile | private static File getNativeLibraryFile(String libname) {
// for now, arch is always x86_64
String pathFormat = "/org/voltdb/native/%s/x86_64";
String libPath = null;
String osName = System.getProperty("os.name").toLowerCase();
if (osName.contains("mac")) {
libPath ... | java | private static File getNativeLibraryFile(String libname) {
// for now, arch is always x86_64
String pathFormat = "/org/voltdb/native/%s/x86_64";
String libPath = null;
String osName = System.getProperty("os.name").toLowerCase();
if (osName.contains("mac")) {
libPath ... | [
"private",
"static",
"File",
"getNativeLibraryFile",
"(",
"String",
"libname",
")",
"{",
"// for now, arch is always x86_64",
"String",
"pathFormat",
"=",
"\"/org/voltdb/native/%s/x86_64\"",
";",
"String",
"libPath",
"=",
"null",
";",
"String",
"osName",
"=",
"System",
... | Returns the native library file copied into a readable location.
@param libname the library name.
@return the native library file copied into a readable location. | [
"Returns",
"the",
"native",
"library",
"file",
"copied",
"into",
"a",
"readable",
"location",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NativeLibraryLoader.java#L144-L181 |
60,576 | VoltDB/voltdb | src/frontend/org/voltdb/utils/SerializationHelper.java | SerializationHelper.writeString | public static void writeString(String value, ByteBuffer buf) {
if (value == null) {
buf.putInt(VoltType.NULL_STRING_LENGTH);
return;
}
byte[] strbytes = value.getBytes(Constants.UTF8ENCODING);
int len = strbytes.length;
buf.putInt(len);
buf.put(s... | java | public static void writeString(String value, ByteBuffer buf) {
if (value == null) {
buf.putInt(VoltType.NULL_STRING_LENGTH);
return;
}
byte[] strbytes = value.getBytes(Constants.UTF8ENCODING);
int len = strbytes.length;
buf.putInt(len);
buf.put(s... | [
"public",
"static",
"void",
"writeString",
"(",
"String",
"value",
",",
"ByteBuffer",
"buf",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"buf",
".",
"putInt",
"(",
"VoltType",
".",
"NULL_STRING_LENGTH",
")",
";",
"return",
";",
"}",
"byte",
"... | Write a string in the standard VoltDB way | [
"Write",
"a",
"string",
"in",
"the",
"standard",
"VoltDB",
"way"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SerializationHelper.java#L235-L246 |
60,577 | VoltDB/voltdb | src/frontend/org/voltdb/utils/SerializationHelper.java | SerializationHelper.writeVarbinary | public static void writeVarbinary(byte[] bytes, ByteBuffer buf) throws IOException {
if (bytes == null) {
buf.putInt(VoltType.NULL_STRING_LENGTH);
return;
}
buf.putInt(bytes.length);
buf.put(bytes);
} | java | public static void writeVarbinary(byte[] bytes, ByteBuffer buf) throws IOException {
if (bytes == null) {
buf.putInt(VoltType.NULL_STRING_LENGTH);
return;
}
buf.putInt(bytes.length);
buf.put(bytes);
} | [
"public",
"static",
"void",
"writeVarbinary",
"(",
"byte",
"[",
"]",
"bytes",
",",
"ByteBuffer",
"buf",
")",
"throws",
"IOException",
"{",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"buf",
".",
"putInt",
"(",
"VoltType",
".",
"NULL_STRING_LENGTH",
")",
... | Write a set of bytes in the standard VoltDB way | [
"Write",
"a",
"set",
"of",
"bytes",
"in",
"the",
"standard",
"VoltDB",
"way"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SerializationHelper.java#L251-L259 |
60,578 | VoltDB/voltdb | examples/geospatial/client/geospatial/BidGenerator.java | BidGenerator.getMaxBidId | private static long getMaxBidId(Client client) {
long currentMaxBidId = 0;
try {
VoltTable vt = client.callProcedure("@AdHoc", "select max(id) from bids").getResults()[0];
vt.advanceRow();
currentMaxBidId = vt.getLong(0);
if (vt.wasNull()) {
... | java | private static long getMaxBidId(Client client) {
long currentMaxBidId = 0;
try {
VoltTable vt = client.callProcedure("@AdHoc", "select max(id) from bids").getResults()[0];
vt.advanceRow();
currentMaxBidId = vt.getLong(0);
if (vt.wasNull()) {
... | [
"private",
"static",
"long",
"getMaxBidId",
"(",
"Client",
"client",
")",
"{",
"long",
"currentMaxBidId",
"=",
"0",
";",
"try",
"{",
"VoltTable",
"vt",
"=",
"client",
".",
"callProcedure",
"(",
"\"@AdHoc\"",
",",
"\"select max(id) from bids\"",
")",
".",
"getR... | Find the current highest bid id in the bids table. We'll start generating
new bids at this number plus one.
@param client A connection to the database
@return current highest bid id | [
"Find",
"the",
"current",
"highest",
"bid",
"id",
"in",
"the",
"bids",
"table",
".",
"We",
"ll",
"start",
"generating",
"new",
"bids",
"at",
"this",
"number",
"plus",
"one",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/geospatial/client/geospatial/BidGenerator.java#L80-L94 |
60,579 | VoltDB/voltdb | examples/geospatial/client/geospatial/BidGenerator.java | BidGenerator.run | @Override
public void run() {
long bidId = m_bidId++;
long advertiserId = Math.abs(m_rand.nextLong()) % NUM_ADVERTISERS;
GeographyValue bidRegion = Regions.pickRandomRegion();
TimestampType bidStartTime = new TimestampType();
TimestampType bidEndTime = new TimestampType(
... | java | @Override
public void run() {
long bidId = m_bidId++;
long advertiserId = Math.abs(m_rand.nextLong()) % NUM_ADVERTISERS;
GeographyValue bidRegion = Regions.pickRandomRegion();
TimestampType bidStartTime = new TimestampType();
TimestampType bidEndTime = new TimestampType(
... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"long",
"bidId",
"=",
"m_bidId",
"++",
";",
"long",
"advertiserId",
"=",
"Math",
".",
"abs",
"(",
"m_rand",
".",
"nextLong",
"(",
")",
")",
"%",
"NUM_ADVERTISERS",
";",
"GeographyValue",
"bidRegion... | This is the "run" method for this Runnable subclass.
Generate one new row for the bids table, and insert it. | [
"This",
"is",
"the",
"run",
"method",
"for",
"this",
"Runnable",
"subclass",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/geospatial/client/geospatial/BidGenerator.java#L101-L126 |
60,580 | VoltDB/voltdb | third_party/java/src/org/apache/jute_voltpatches/compiler/JFile.java | JFile.getName | String getName() {
int idx = mName.lastIndexOf('/');
return (idx > 0) ? mName.substring(idx) : mName;
} | java | String getName() {
int idx = mName.lastIndexOf('/');
return (idx > 0) ? mName.substring(idx) : mName;
} | [
"String",
"getName",
"(",
")",
"{",
"int",
"idx",
"=",
"mName",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"return",
"(",
"idx",
">",
"0",
")",
"?",
"mName",
".",
"substring",
"(",
"idx",
")",
":",
"mName",
";",
"}"
] | Strip the other pathname components and return the basename | [
"Strip",
"the",
"other",
"pathname",
"components",
"and",
"return",
"the",
"basename"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/jute_voltpatches/compiler/JFile.java#L54-L57 |
60,581 | VoltDB/voltdb | src/frontend/org/voltdb/planner/StatementPartitioning.java | StatementPartitioning.singlePartitioningExpression | public AbstractExpression singlePartitioningExpression() {
AbstractExpression e = singlePartitioningExpressionForReport();
if (e != null && isUsefulPartitioningExpression(e)) {
return e;
}
return null;
} | java | public AbstractExpression singlePartitioningExpression() {
AbstractExpression e = singlePartitioningExpressionForReport();
if (e != null && isUsefulPartitioningExpression(e)) {
return e;
}
return null;
} | [
"public",
"AbstractExpression",
"singlePartitioningExpression",
"(",
")",
"{",
"AbstractExpression",
"e",
"=",
"singlePartitioningExpressionForReport",
"(",
")",
";",
"if",
"(",
"e",
"!=",
"null",
"&&",
"isUsefulPartitioningExpression",
"(",
"e",
")",
")",
"{",
"ret... | smart accessor - only returns a value if it was unique and is useful
@return | [
"smart",
"accessor",
"-",
"only",
"returns",
"a",
"value",
"if",
"it",
"was",
"unique",
"and",
"is",
"useful"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/StatementPartitioning.java#L310-L316 |
60,582 | VoltDB/voltdb | src/frontend/org/voltdb/planner/StatementPartitioning.java | StatementPartitioning.analyzeTablePartitioning | void analyzeTablePartitioning(Collection<StmtTableScan> collection)
throws PlanningErrorException
{
m_countOfPartitionedTables = 0;
// Do we have a need for a distributed scan at all?
// Iterate over the tables to collect partition columns.
for (StmtTableScan tableScan : ... | java | void analyzeTablePartitioning(Collection<StmtTableScan> collection)
throws PlanningErrorException
{
m_countOfPartitionedTables = 0;
// Do we have a need for a distributed scan at all?
// Iterate over the tables to collect partition columns.
for (StmtTableScan tableScan : ... | [
"void",
"analyzeTablePartitioning",
"(",
"Collection",
"<",
"StmtTableScan",
">",
"collection",
")",
"throws",
"PlanningErrorException",
"{",
"m_countOfPartitionedTables",
"=",
"0",
";",
"// Do we have a need for a distributed scan at all?",
"// Iterate over the tables to collect p... | This simple analysis counts the number of partitioned tables in the join tree
of a query, and initializes a guess for the count of independently partitioned tables.
@param tableCacheList
@throws PlanningErrorException | [
"This",
"simple",
"analysis",
"counts",
"the",
"number",
"of",
"partitioned",
"tables",
"in",
"the",
"join",
"tree",
"of",
"a",
"query",
"and",
"initializes",
"a",
"guess",
"for",
"the",
"count",
"of",
"independently",
"partitioned",
"tables",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/StatementPartitioning.java#L563-L576 |
60,583 | VoltDB/voltdb | src/frontend/org/voltdb/planner/StatementPartitioning.java | StatementPartitioning.resetAnalysisState | public void resetAnalysisState() {
m_countOfIndependentlyPartitionedTables = -1;
m_countOfPartitionedTables = -1;
m_fullColumnName = null;
m_inferredExpression.clear();
m_inferredParameterIndex = -1;
m_inferredValue = null;
m_isDML = false;
setJoinValid(tr... | java | public void resetAnalysisState() {
m_countOfIndependentlyPartitionedTables = -1;
m_countOfPartitionedTables = -1;
m_fullColumnName = null;
m_inferredExpression.clear();
m_inferredParameterIndex = -1;
m_inferredValue = null;
m_isDML = false;
setJoinValid(tr... | [
"public",
"void",
"resetAnalysisState",
"(",
")",
"{",
"m_countOfIndependentlyPartitionedTables",
"=",
"-",
"1",
";",
"m_countOfPartitionedTables",
"=",
"-",
"1",
";",
"m_fullColumnName",
"=",
"null",
";",
"m_inferredExpression",
".",
"clear",
"(",
")",
";",
"m_in... | Sometimes when we fail to plan a statement, we try again with different inputs
using the same StatementPartitioning object. In this case, it's incumbent on
callers to reset the cached analysis state set by calling this method.
TODO: one could imagine separating this class into two classes:
- One for partitioning cont... | [
"Sometimes",
"when",
"we",
"fail",
"to",
"plan",
"a",
"statement",
"we",
"try",
"again",
"with",
"different",
"inputs",
"using",
"the",
"same",
"StatementPartitioning",
"object",
".",
"In",
"this",
"case",
"it",
"s",
"incumbent",
"on",
"callers",
"to",
"rese... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/StatementPartitioning.java#L590-L601 |
60,584 | VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.callProcedure | public boolean callProcedure(Invocation invocation, ProcedureCallback callback)
{
try {
boolean result = m_importServerAdapter.callProcedure(this,
m_backPressurePredicate,
... | java | public boolean callProcedure(Invocation invocation, ProcedureCallback callback)
{
try {
boolean result = m_importServerAdapter.callProcedure(this,
m_backPressurePredicate,
... | [
"public",
"boolean",
"callProcedure",
"(",
"Invocation",
"invocation",
",",
"ProcedureCallback",
"callback",
")",
"{",
"try",
"{",
"boolean",
"result",
"=",
"m_importServerAdapter",
".",
"callProcedure",
"(",
"this",
",",
"m_backPressurePredicate",
",",
"callback",
... | This should be used importer implementations to execute a stored procedure.
@param invocation Invocation object with procedure name and parameter information
@param callback the callback that will receive procedure invocation status
@return returns true if the procedure execution went through successfully; false other... | [
"This",
"should",
"be",
"used",
"importer",
"implementations",
"to",
"execute",
"a",
"stored",
"procedure",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L108-L121 |
60,585 | VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.rateLimitedLog | @Override
public void rateLimitedLog(Level level, Throwable cause, String format, Object... args)
{
m_logger.rateLimitedLog(LOG_SUPPRESSION_INTERVAL_SECONDS, level, cause, format, args);
} | java | @Override
public void rateLimitedLog(Level level, Throwable cause, String format, Object... args)
{
m_logger.rateLimitedLog(LOG_SUPPRESSION_INTERVAL_SECONDS, level, cause, format, args);
} | [
"@",
"Override",
"public",
"void",
"rateLimitedLog",
"(",
"Level",
"level",
",",
"Throwable",
"cause",
",",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"m_logger",
".",
"rateLimitedLog",
"(",
"LOG_SUPPRESSION_INTERVAL_SECONDS",
",",
"level",
",",... | This rate limited log must be used by the importers to log messages that may
happen frequently and must be rate limited.
@param level the log level
@param cause cause exception, if there is one
@param format error message format
@param args arguments to format the error message | [
"This",
"rate",
"limited",
"log",
"must",
"be",
"used",
"by",
"the",
"importers",
"to",
"log",
"messages",
"that",
"may",
"happen",
"frequently",
"and",
"must",
"be",
"rate",
"limited",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L157-L161 |
60,586 | VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.trace | protected void trace(Throwable t, String msgFormat, Object... args)
{
m_logger.trace(String.format(msgFormat, args), t);
} | java | protected void trace(Throwable t, String msgFormat, Object... args)
{
m_logger.trace(String.format(msgFormat, args), t);
} | [
"protected",
"void",
"trace",
"(",
"Throwable",
"t",
",",
"String",
"msgFormat",
",",
"Object",
"...",
"args",
")",
"{",
"m_logger",
".",
"trace",
"(",
"String",
".",
"format",
"(",
"msgFormat",
",",
"args",
")",
",",
"t",
")",
";",
"}"
] | Log a TRACE level log message.
@param msgFormat Format
@param t Throwable to log | [
"Log",
"a",
"TRACE",
"level",
"log",
"message",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L221-L224 |
60,587 | VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.warn | @Override
public void warn(Throwable t, String msgFormat, Object... args)
{
m_logger.warn(String.format(msgFormat, args), t);
} | java | @Override
public void warn(Throwable t, String msgFormat, Object... args)
{
m_logger.warn(String.format(msgFormat, args), t);
} | [
"@",
"Override",
"public",
"void",
"warn",
"(",
"Throwable",
"t",
",",
"String",
"msgFormat",
",",
"Object",
"...",
"args",
")",
"{",
"m_logger",
".",
"warn",
"(",
"String",
".",
"format",
"(",
"msgFormat",
",",
"args",
")",
",",
"t",
")",
";",
"}"
] | Log a WARN level log message.
@param msgFormat Format
@param t Throwable to log | [
"Log",
"a",
"WARN",
"level",
"log",
"message",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L232-L236 |
60,588 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java | Right.add | public void add(Right right) {
if (isFull) {
return;
}
if (right.isFull) {
clear();
isFull = true;
return;
}
isFullSelect |= right.isFullSelect;
isFullInsert |= right.isFullInsert;
isFullUpdate |= ri... | java | public void add(Right right) {
if (isFull) {
return;
}
if (right.isFull) {
clear();
isFull = true;
return;
}
isFullSelect |= right.isFullSelect;
isFullInsert |= right.isFullInsert;
isFullUpdate |= ri... | [
"public",
"void",
"add",
"(",
"Right",
"right",
")",
"{",
"if",
"(",
"isFull",
")",
"{",
"return",
";",
"}",
"if",
"(",
"right",
".",
"isFull",
")",
"{",
"clear",
"(",
")",
";",
"isFull",
"=",
"true",
";",
"return",
";",
"}",
"isFullSelect",
"|="... | Supports column level GRANT | [
"Supports",
"column",
"level",
"GRANT"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java#L138-L207 |
60,589 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java | Right.remove | public void remove(SchemaObject object, Right right) {
if (right.isFull) {
clear();
return;
}
if (isFull) {
isFull = false;
isFullSelect = isFullInsert = isFullUpdate = isFullReferences =
isFullDelete = true;
}
i... | java | public void remove(SchemaObject object, Right right) {
if (right.isFull) {
clear();
return;
}
if (isFull) {
isFull = false;
isFullSelect = isFullInsert = isFullUpdate = isFullReferences =
isFullDelete = true;
}
i... | [
"public",
"void",
"remove",
"(",
"SchemaObject",
"object",
",",
"Right",
"right",
")",
"{",
"if",
"(",
"right",
".",
"isFull",
")",
"{",
"clear",
"(",
")",
";",
"return",
";",
"}",
"if",
"(",
"isFull",
")",
"{",
"isFull",
"=",
"false",
";",
"isFull... | supports column level REVOKE | [
"supports",
"column",
"level",
"REVOKE"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java#L212-L314 |
60,590 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java | Right.containsAllColumns | static boolean containsAllColumns(OrderedHashSet columnSet, Table table,
boolean[] columnCheckList) {
for (int i = 0; i < columnCheckList.length; i++) {
if (columnCheckList[i]) {
if (columnSet == null) {
return false;
... | java | static boolean containsAllColumns(OrderedHashSet columnSet, Table table,
boolean[] columnCheckList) {
for (int i = 0; i < columnCheckList.length; i++) {
if (columnCheckList[i]) {
if (columnSet == null) {
return false;
... | [
"static",
"boolean",
"containsAllColumns",
"(",
"OrderedHashSet",
"columnSet",
",",
"Table",
"table",
",",
"boolean",
"[",
"]",
"columnCheckList",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"columnCheckList",
".",
"length",
";",
"i",
"++",
... | Supports column level checks | [
"Supports",
"column",
"level",
"checks"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java#L486-L504 |
60,591 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java | Right.getTableRightsSQL | String getTableRightsSQL(Table table) {
StringBuffer sb = new StringBuffer();
if (isFull) {
return Tokens.T_ALL;
}
if (isFullSelect) {
sb.append(Tokens.T_SELECT);
sb.append(',');
} else if (selectColumnSet != null) {
sb.append(To... | java | String getTableRightsSQL(Table table) {
StringBuffer sb = new StringBuffer();
if (isFull) {
return Tokens.T_ALL;
}
if (isFullSelect) {
sb.append(Tokens.T_SELECT);
sb.append(',');
} else if (selectColumnSet != null) {
sb.append(To... | [
"String",
"getTableRightsSQL",
"(",
"Table",
"table",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"isFull",
")",
"{",
"return",
"Tokens",
".",
"T_ALL",
";",
"}",
"if",
"(",
"isFullSelect",
")",
"{",
"sb",
".",
... | supports column level GRANT | [
"supports",
"column",
"level",
"GRANT"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java#L680-L737 |
60,592 | VoltDB/voltdb | src/frontend/org/voltcore/utils/PortGenerator.java | PortGenerator.next | public synchronized int next() {
while(nextPort <= MAX_STATIC_PORT) {
int port = nextPort++;
if (MiscUtils.isBindable(port)) {
return port;
}
}
throw new RuntimeException("Exhausted all possible ports");
} | java | public synchronized int next() {
while(nextPort <= MAX_STATIC_PORT) {
int port = nextPort++;
if (MiscUtils.isBindable(port)) {
return port;
}
}
throw new RuntimeException("Exhausted all possible ports");
} | [
"public",
"synchronized",
"int",
"next",
"(",
")",
"{",
"while",
"(",
"nextPort",
"<=",
"MAX_STATIC_PORT",
")",
"{",
"int",
"port",
"=",
"nextPort",
"++",
";",
"if",
"(",
"MiscUtils",
".",
"isBindable",
"(",
"port",
")",
")",
"{",
"return",
"port",
";"... | Return the next bindable port | [
"Return",
"the",
"next",
"bindable",
"port"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/PortGenerator.java#L37-L45 |
60,593 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.range | static Range<Long> range(long start, long end) {
return Range.closed(start, end).canonical(DiscreteDomain.longs());
} | java | static Range<Long> range(long start, long end) {
return Range.closed(start, end).canonical(DiscreteDomain.longs());
} | [
"static",
"Range",
"<",
"Long",
">",
"range",
"(",
"long",
"start",
",",
"long",
"end",
")",
"{",
"return",
"Range",
".",
"closed",
"(",
"start",
",",
"end",
")",
".",
"canonical",
"(",
"DiscreteDomain",
".",
"longs",
"(",
")",
")",
";",
"}"
] | Returns a canonical range that can be added to the internal range
set. Only ranges returned by this method can be added to the range set,
otherwise range operations like contains may yield unexpected
results. Consult the Guava doc on Range for details.
@param start Start of the range
@param end End of the rang... | [
"Returns",
"a",
"canonical",
"range",
"that",
"can",
"be",
"added",
"to",
"the",
"internal",
"range",
"set",
".",
"Only",
"ranges",
"returned",
"by",
"this",
"method",
"can",
"be",
"added",
"to",
"the",
"range",
"set",
"otherwise",
"range",
"operations",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L45-L47 |
60,594 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.start | private static long start(Range<Long> range) {
if (range.lowerBoundType() == BoundType.OPEN) {
return DiscreteDomain.longs().next(range.lowerEndpoint());
} else {
return range.lowerEndpoint();
}
} | java | private static long start(Range<Long> range) {
if (range.lowerBoundType() == BoundType.OPEN) {
return DiscreteDomain.longs().next(range.lowerEndpoint());
} else {
return range.lowerEndpoint();
}
} | [
"private",
"static",
"long",
"start",
"(",
"Range",
"<",
"Long",
">",
"range",
")",
"{",
"if",
"(",
"range",
".",
"lowerBoundType",
"(",
")",
"==",
"BoundType",
".",
"OPEN",
")",
"{",
"return",
"DiscreteDomain",
".",
"longs",
"(",
")",
".",
"next",
"... | Get the start of the range. Always use this method to get the start of a
range because it respects the bound type.
@param range
@return Start of the range | [
"Get",
"the",
"start",
"of",
"the",
"range",
".",
"Always",
"use",
"this",
"method",
"to",
"get",
"the",
"start",
"of",
"a",
"range",
"because",
"it",
"respects",
"the",
"bound",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L55-L61 |
60,595 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.end | private static long end(Range<Long> range) {
if (range.upperBoundType() == BoundType.OPEN) {
return DiscreteDomain.longs().previous(range.upperEndpoint());
} else {
return range.upperEndpoint();
}
} | java | private static long end(Range<Long> range) {
if (range.upperBoundType() == BoundType.OPEN) {
return DiscreteDomain.longs().previous(range.upperEndpoint());
} else {
return range.upperEndpoint();
}
} | [
"private",
"static",
"long",
"end",
"(",
"Range",
"<",
"Long",
">",
"range",
")",
"{",
"if",
"(",
"range",
".",
"upperBoundType",
"(",
")",
"==",
"BoundType",
".",
"OPEN",
")",
"{",
"return",
"DiscreteDomain",
".",
"longs",
"(",
")",
".",
"previous",
... | Get the end of the range. Always use this method to get the end of a
range because it respects the bound type.
@param range
@return End of the range | [
"Get",
"the",
"end",
"of",
"the",
"range",
".",
"Always",
"use",
"this",
"method",
"to",
"get",
"the",
"end",
"of",
"a",
"range",
"because",
"it",
"respects",
"the",
"bound",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L69-L75 |
60,596 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.append | public void append(long start, long end) {
assert(start <= end && (m_map.isEmpty() || start > end(m_map.span())));
addRange(start, end);
} | java | public void append(long start, long end) {
assert(start <= end && (m_map.isEmpty() || start > end(m_map.span())));
addRange(start, end);
} | [
"public",
"void",
"append",
"(",
"long",
"start",
",",
"long",
"end",
")",
"{",
"assert",
"(",
"start",
"<=",
"end",
"&&",
"(",
"m_map",
".",
"isEmpty",
"(",
")",
"||",
"start",
">",
"end",
"(",
"m_map",
".",
"span",
"(",
")",
")",
")",
")",
";... | Appends a range to the tracker. The range has to be after the last sequence number
of the tracker.
@param start
@param end | [
"Appends",
"a",
"range",
"to",
"the",
"tracker",
".",
"The",
"range",
"has",
"to",
"be",
"after",
"the",
"last",
"sequence",
"number",
"of",
"the",
"tracker",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L116-L119 |
60,597 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.truncate | public int truncate(long newTruncationPoint) {
int truncated = 0;
if (m_map.isEmpty()) {
m_map.add(range(newTruncationPoint, newTruncationPoint));
m_hasSentinel = true;
return truncated;
}
if (newTruncationPoint < getFirstSeqNo()) {
return ... | java | public int truncate(long newTruncationPoint) {
int truncated = 0;
if (m_map.isEmpty()) {
m_map.add(range(newTruncationPoint, newTruncationPoint));
m_hasSentinel = true;
return truncated;
}
if (newTruncationPoint < getFirstSeqNo()) {
return ... | [
"public",
"int",
"truncate",
"(",
"long",
"newTruncationPoint",
")",
"{",
"int",
"truncated",
"=",
"0",
";",
"if",
"(",
"m_map",
".",
"isEmpty",
"(",
")",
")",
"{",
"m_map",
".",
"add",
"(",
"range",
"(",
"newTruncationPoint",
",",
"newTruncationPoint",
... | Truncate the tracker to the given safe point. After truncation, the new
safe point will be the first sequence number of the tracker. If the new safe point
is before the first sequence number of the tracker, it's a no-op. If the
map is empty, truncation point will be the new safe point of tracker.
@param newTruncationPo... | [
"Truncate",
"the",
"tracker",
"to",
"the",
"given",
"safe",
"point",
".",
"After",
"truncation",
"the",
"new",
"safe",
"point",
"will",
"be",
"the",
"first",
"sequence",
"number",
"of",
"the",
"tracker",
".",
"If",
"the",
"new",
"safe",
"point",
"is",
"b... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L129-L164 |
60,598 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.truncateAfter | public void truncateAfter(long newTruncationPoint) {
if (size() == 0) {
m_map.add(range(newTruncationPoint, newTruncationPoint));
m_hasSentinel = true;
return;
}
if (newTruncationPoint > getLastSeqNo()) {
return;
}
final Iterator<Ra... | java | public void truncateAfter(long newTruncationPoint) {
if (size() == 0) {
m_map.add(range(newTruncationPoint, newTruncationPoint));
m_hasSentinel = true;
return;
}
if (newTruncationPoint > getLastSeqNo()) {
return;
}
final Iterator<Ra... | [
"public",
"void",
"truncateAfter",
"(",
"long",
"newTruncationPoint",
")",
"{",
"if",
"(",
"size",
"(",
")",
"==",
"0",
")",
"{",
"m_map",
".",
"add",
"(",
"range",
"(",
"newTruncationPoint",
",",
"newTruncationPoint",
")",
")",
";",
"m_hasSentinel",
"=",
... | Truncate the tracker to the given truncation point. After truncation,
any ranges after the new truncation point will be removed.
If the new safe point is after the last sequence number of the tracker,
it's a no-op. If the map is empty, truncation point will be the new safe point of tracker.
@param newTruncationPoint ... | [
"Truncate",
"the",
"tracker",
"to",
"the",
"given",
"truncation",
"point",
".",
"After",
"truncation",
"any",
"ranges",
"after",
"the",
"new",
"truncation",
"point",
"will",
"be",
"removed",
".",
"If",
"the",
"new",
"safe",
"point",
"is",
"after",
"the",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L173-L199 |
60,599 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.getRangeContaining | public Pair<Long, Long> getRangeContaining(long seq) {
Range<Long> range = m_map.rangeContaining(seq);
if (range != null) {
return new Pair<Long, Long>(start(range), end(range));
}
return null;
} | java | public Pair<Long, Long> getRangeContaining(long seq) {
Range<Long> range = m_map.rangeContaining(seq);
if (range != null) {
return new Pair<Long, Long>(start(range), end(range));
}
return null;
} | [
"public",
"Pair",
"<",
"Long",
",",
"Long",
">",
"getRangeContaining",
"(",
"long",
"seq",
")",
"{",
"Range",
"<",
"Long",
">",
"range",
"=",
"m_map",
".",
"rangeContaining",
"(",
"seq",
")",
";",
"if",
"(",
"range",
"!=",
"null",
")",
"{",
"return",... | Get range that contains given sequence number
@param seq
@return a pair of start and end sequence number of the range if it exists,
otherwise return null | [
"Get",
"range",
"that",
"contains",
"given",
"sequence",
"number"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L227-L233 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.