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
58,300
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/loader/StreamLoader.java
StreamLoader.flushQueues
private void flushQueues() { // Terminate data loading thread. LOGGER.debug("Flush Queues"); try { _queueData.put(new byte[0]); _thread.join(10000); if (_thread.isAlive()) { _thread.interrupt(); } } catch (Exception ex) { String msg = "Failed to...
java
private void flushQueues() { // Terminate data loading thread. LOGGER.debug("Flush Queues"); try { _queueData.put(new byte[0]); _thread.join(10000); if (_thread.isAlive()) { _thread.interrupt(); } } catch (Exception ex) { String msg = "Failed to...
[ "private", "void", "flushQueues", "(", ")", "{", "// Terminate data loading thread.", "LOGGER", ".", "debug", "(", "\"Flush Queues\"", ")", ";", "try", "{", "_queueData", ".", "put", "(", "new", "byte", "[", "0", "]", ")", ";", "_thread", ".", "join", "(",...
Flushes data by joining PUT and PROCESS queues
[ "Flushes", "data", "by", "joining", "PUT", "and", "PROCESS", "queues" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/loader/StreamLoader.java#L613-L649
58,301
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/loader/StreamLoader.java
StreamLoader.resetOperation
@Override public void resetOperation(Operation op) { LOGGER.debug("Reset Loader"); if (op.equals(_op)) { //no-op return; } LOGGER.debug("Operation is changing from {} to {}", _op, op); _op = op; if (_stage != null) { try { queuePut(_stage); } ...
java
@Override public void resetOperation(Operation op) { LOGGER.debug("Reset Loader"); if (op.equals(_op)) { //no-op return; } LOGGER.debug("Operation is changing from {} to {}", _op, op); _op = op; if (_stage != null) { try { queuePut(_stage); } ...
[ "@", "Override", "public", "void", "resetOperation", "(", "Operation", "op", ")", "{", "LOGGER", ".", "debug", "(", "\"Reset Loader\"", ")", ";", "if", "(", "op", ".", "equals", "(", "_op", ")", ")", "{", "//no-op", "return", ";", "}", "LOGGER", ".", ...
If operation changes, existing stage needs to be scheduled for processing.
[ "If", "operation", "changes", "existing", "stage", "needs", "to", "be", "scheduled", "for", "processing", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/loader/StreamLoader.java#L824-L852
58,302
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/FileCacheManager.java
FileCacheManager.overrideCacheFile
void overrideCacheFile(File newCacheFile) { this.cacheFile = newCacheFile; this.cacheDir = newCacheFile.getParentFile(); this.baseCacheFileName = newCacheFile.getName(); }
java
void overrideCacheFile(File newCacheFile) { this.cacheFile = newCacheFile; this.cacheDir = newCacheFile.getParentFile(); this.baseCacheFileName = newCacheFile.getName(); }
[ "void", "overrideCacheFile", "(", "File", "newCacheFile", ")", "{", "this", ".", "cacheFile", "=", "newCacheFile", ";", "this", ".", "cacheDir", "=", "newCacheFile", ".", "getParentFile", "(", ")", ";", "this", ".", "baseCacheFileName", "=", "newCacheFile", "....
Override the cache file. @param newCacheFile a file object to override the default one.
[ "Override", "the", "cache", "file", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/FileCacheManager.java#L96-L101
58,303
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/FileCacheManager.java
FileCacheManager.readCacheFile
JsonNode readCacheFile() { if (cacheFile == null || !this.checkCacheLockFile()) { // no cache or the cache is not valid. return null; } try { if (!cacheFile.exists()) { LOGGER.debug( "Cache file doesn't exists. File: {}", cacheFile); return null;...
java
JsonNode readCacheFile() { if (cacheFile == null || !this.checkCacheLockFile()) { // no cache or the cache is not valid. return null; } try { if (!cacheFile.exists()) { LOGGER.debug( "Cache file doesn't exists. File: {}", cacheFile); return null;...
[ "JsonNode", "readCacheFile", "(", ")", "{", "if", "(", "cacheFile", "==", "null", "||", "!", "this", ".", "checkCacheLockFile", "(", ")", ")", "{", "// no cache or the cache is not valid.", "return", "null", ";", "}", "try", "{", "if", "(", "!", "cacheFile",...
Reads the cache file.
[ "Reads", "the", "cache", "file", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/FileCacheManager.java#L191-L220
58,304
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/FileCacheManager.java
FileCacheManager.tryLockCacheFile
private boolean tryLockCacheFile() { int cnt = 0; boolean locked = false; while (cnt < 100 && !(locked = lockCacheFile())) { try { Thread.sleep(100); } catch (InterruptedException ex) { // doesn't matter } ++cnt; } if (!locked) { ...
java
private boolean tryLockCacheFile() { int cnt = 0; boolean locked = false; while (cnt < 100 && !(locked = lockCacheFile())) { try { Thread.sleep(100); } catch (InterruptedException ex) { // doesn't matter } ++cnt; } if (!locked) { ...
[ "private", "boolean", "tryLockCacheFile", "(", ")", "{", "int", "cnt", "=", "0", ";", "boolean", "locked", "=", "false", ";", "while", "(", "cnt", "<", "100", "&&", "!", "(", "locked", "=", "lockCacheFile", "(", ")", ")", ")", "{", "try", "{", "Thr...
Tries to lock the cache file @return true if success or false
[ "Tries", "to", "lock", "the", "cache", "file" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/FileCacheManager.java#L280-L301
58,305
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.verifyLocalFilePath
private void verifyLocalFilePath(String localFilePathFromGS) throws SnowflakeSQLException { if (command == null) { logger.error("null command"); return; } if (command.indexOf(FILE_PROTOCOL) < 0) { logger.error( "file:// prefix not found in command: {}", command); ...
java
private void verifyLocalFilePath(String localFilePathFromGS) throws SnowflakeSQLException { if (command == null) { logger.error("null command"); return; } if (command.indexOf(FILE_PROTOCOL) < 0) { logger.error( "file:// prefix not found in command: {}", command); ...
[ "private", "void", "verifyLocalFilePath", "(", "String", "localFilePathFromGS", ")", "throws", "SnowflakeSQLException", "{", "if", "(", "command", "==", "null", ")", "{", "logger", ".", "error", "(", "\"null command\"", ")", ";", "return", ";", "}", "if", "(",...
A helper method to verify if the local file path from GS matches what's parsed locally. This is for security purpose as documented in SNOW-15153. @param localFilePathFromGS the local file path to verify @throws SnowflakeSQLException
[ "A", "helper", "method", "to", "verify", "if", "the", "local", "file", "path", "from", "GS", "matches", "what", "s", "parsed", "locally", ".", "This", "is", "for", "security", "purpose", "as", "documented", "in", "SNOW", "-", "15153", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L1189-L1271
58,306
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.uploadStream
private void uploadStream() throws SnowflakeSQLException { try { threadExecutor = SnowflakeUtil.createDefaultExecutorService( "sf-stream-upload-worker-", 1); RemoteStoreFileEncryptionMaterial encMat = encryptionMaterial.get(0); if (commandType == CommandType.UPLOAD) { ...
java
private void uploadStream() throws SnowflakeSQLException { try { threadExecutor = SnowflakeUtil.createDefaultExecutorService( "sf-stream-upload-worker-", 1); RemoteStoreFileEncryptionMaterial encMat = encryptionMaterial.get(0); if (commandType == CommandType.UPLOAD) { ...
[ "private", "void", "uploadStream", "(", ")", "throws", "SnowflakeSQLException", "{", "try", "{", "threadExecutor", "=", "SnowflakeUtil", ".", "createDefaultExecutorService", "(", "\"sf-stream-upload-worker-\"", ",", "1", ")", ";", "RemoteStoreFileEncryptionMaterial", "enc...
Helper to upload data from a stream
[ "Helper", "to", "upload", "data", "from", "a", "stream" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L1434-L1480
58,307
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.downloadStream
InputStream downloadStream(String fileName) throws SnowflakeSQLException { if (stageInfo.getStageType() == StageInfo.StageType.LOCAL_FS) { logger.error("downloadStream function doesn't support local file system"); throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR, ...
java
InputStream downloadStream(String fileName) throws SnowflakeSQLException { if (stageInfo.getStageType() == StageInfo.StageType.LOCAL_FS) { logger.error("downloadStream function doesn't support local file system"); throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR, ...
[ "InputStream", "downloadStream", "(", "String", "fileName", ")", "throws", "SnowflakeSQLException", "{", "if", "(", "stageInfo", ".", "getStageType", "(", ")", "==", "StageInfo", ".", "StageType", ".", "LOCAL_FS", ")", "{", "logger", ".", "error", "(", "\"down...
Download a file from remote, and return an input stream
[ "Download", "a", "file", "from", "remote", "and", "return", "an", "input", "stream" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L1485-L1512
58,308
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.downloadFiles
private void downloadFiles() throws SnowflakeSQLException { try { threadExecutor = SnowflakeUtil.createDefaultExecutorService( "sf-file-download-worker-", 1); for (String srcFile : sourceFiles) { FileMetadata fileMetadata = fileMetadataMap.get(srcFile); // Check i...
java
private void downloadFiles() throws SnowflakeSQLException { try { threadExecutor = SnowflakeUtil.createDefaultExecutorService( "sf-file-download-worker-", 1); for (String srcFile : sourceFiles) { FileMetadata fileMetadata = fileMetadataMap.get(srcFile); // Check i...
[ "private", "void", "downloadFiles", "(", ")", "throws", "SnowflakeSQLException", "{", "try", "{", "threadExecutor", "=", "SnowflakeUtil", ".", "createDefaultExecutorService", "(", "\"sf-file-download-worker-\"", ",", "1", ")", ";", "for", "(", "String", "srcFile", "...
Helper to download files from remote
[ "Helper", "to", "download", "files", "from", "remote" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L1517-L1575
58,309
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.uploadFiles
private void uploadFiles(Set<String> fileList, int parallel) throws SnowflakeSQLException { try { threadExecutor = SnowflakeUtil.createDefaultExecutorService( "sf-file-upload-worker-", parallel); for (String srcFile : fileList) { FileMetadata fil...
java
private void uploadFiles(Set<String> fileList, int parallel) throws SnowflakeSQLException { try { threadExecutor = SnowflakeUtil.createDefaultExecutorService( "sf-file-upload-worker-", parallel); for (String srcFile : fileList) { FileMetadata fil...
[ "private", "void", "uploadFiles", "(", "Set", "<", "String", ">", "fileList", ",", "int", "parallel", ")", "throws", "SnowflakeSQLException", "{", "try", "{", "threadExecutor", "=", "SnowflakeUtil", ".", "createDefaultExecutorService", "(", "\"sf-file-upload-worker-\"...
This method create a thread pool based on requested number of threads and upload the files using the thread pool. @param fileList The set of files to upload @param parallel degree of parallelism for the upload @throws SnowflakeSQLException
[ "This", "method", "create", "a", "thread", "pool", "based", "on", "requested", "number", "of", "threads", "and", "upload", "the", "files", "using", "the", "thread", "pool", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L1585-L1654
58,310
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.expandFileNames
static public Set<String> expandFileNames(String[] filePathList) throws SnowflakeSQLException { Set<String> result = new HashSet<String>(); // a location to file pattern map so that we only need to list the // same directory once when they appear in multiple times. Map<String, List<String>> locatio...
java
static public Set<String> expandFileNames(String[] filePathList) throws SnowflakeSQLException { Set<String> result = new HashSet<String>(); // a location to file pattern map so that we only need to list the // same directory once when they appear in multiple times. Map<String, List<String>> locatio...
[ "static", "public", "Set", "<", "String", ">", "expandFileNames", "(", "String", "[", "]", "filePathList", ")", "throws", "SnowflakeSQLException", "{", "Set", "<", "String", ">", "result", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "// a loc...
process a list of file paths separated by "," and expand the wildcards if any to generate the list of paths for all files matched by the wildcards @param filePathList file path list @return a set of file names that is matched @throws SnowflakeSQLException if cannot find the file
[ "process", "a", "list", "of", "file", "paths", "separated", "by", "and", "expand", "the", "wildcards", "if", "any", "to", "generate", "the", "list", "of", "paths", "for", "all", "files", "matched", "by", "the", "wildcards" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L1704-L1805
58,311
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.mimeTypeToCompressionType
private FileCompressionType mimeTypeToCompressionType(String mimeTypeStr) throws MimeTypeParseException { MimeType mimeType = null; if (mimeTypeStr != null) { mimeType = new MimeType(mimeTypeStr); } if (mimeType != null && mimeType.getSubType() != null) { return FileCompression...
java
private FileCompressionType mimeTypeToCompressionType(String mimeTypeStr) throws MimeTypeParseException { MimeType mimeType = null; if (mimeTypeStr != null) { mimeType = new MimeType(mimeTypeStr); } if (mimeType != null && mimeType.getSubType() != null) { return FileCompression...
[ "private", "FileCompressionType", "mimeTypeToCompressionType", "(", "String", "mimeTypeStr", ")", "throws", "MimeTypeParseException", "{", "MimeType", "mimeType", "=", "null", ";", "if", "(", "mimeTypeStr", "!=", "null", ")", "{", "mimeType", "=", "new", "MimeType",...
Derive compression type from mime type @param mimeTypeStr @return @throws MimeTypeParseException
[ "Derive", "compression", "type", "from", "mime", "type" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L2510-L2527
58,312
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.getMimeTypeFromFileExtension
private String getMimeTypeFromFileExtension(String srcFile) { String srcFileLowCase = srcFile.toLowerCase(); for (FileCompressionType compressionType : FileCompressionType.values()) { if (srcFileLowCase.endsWith(compressionType.fileExtension)) { return compressionType.mimeType + "/" +...
java
private String getMimeTypeFromFileExtension(String srcFile) { String srcFileLowCase = srcFile.toLowerCase(); for (FileCompressionType compressionType : FileCompressionType.values()) { if (srcFileLowCase.endsWith(compressionType.fileExtension)) { return compressionType.mimeType + "/" +...
[ "private", "String", "getMimeTypeFromFileExtension", "(", "String", "srcFile", ")", "{", "String", "srcFileLowCase", "=", "srcFile", ".", "toLowerCase", "(", ")", ";", "for", "(", "FileCompressionType", "compressionType", ":", "FileCompressionType", ".", "values", "...
Derive mime type from file extension @param srcFile @return
[ "Derive", "mime", "type", "from", "file", "extension" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L2753-L2767
58,313
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.extractLocationAndPath
static public remoteLocation extractLocationAndPath(String stageLocationPath) { String location = stageLocationPath; String path = ""; // split stage location as location name and path if (stageLocationPath.contains("/")) { location = stageLocationPath.substring(0, stageLocationPath.indexOf...
java
static public remoteLocation extractLocationAndPath(String stageLocationPath) { String location = stageLocationPath; String path = ""; // split stage location as location name and path if (stageLocationPath.contains("/")) { location = stageLocationPath.substring(0, stageLocationPath.indexOf...
[ "static", "public", "remoteLocation", "extractLocationAndPath", "(", "String", "stageLocationPath", ")", "{", "String", "location", "=", "stageLocationPath", ";", "String", "path", "=", "\"\"", ";", "// split stage location as location name and path", "if", "(", "stageLoc...
A small helper for extracting location name and path from full location path @param stageLocationPath stage location @return remoteLocation object
[ "A", "small", "helper", "for", "extracting", "location", "name", "and", "path", "from", "full", "location", "path" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L2775-L2788
58,314
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.describeColumns
@Override public List<SnowflakeColumnMetadata> describeColumns() throws Exception { return SnowflakeUtil.describeFixedViewColumns( commandType == CommandType.UPLOAD ? (showEncryptionParameter ? UploadCommandEncryptionFacade.class : UploadCommandFacade.class) : (showEncryptionPar...
java
@Override public List<SnowflakeColumnMetadata> describeColumns() throws Exception { return SnowflakeUtil.describeFixedViewColumns( commandType == CommandType.UPLOAD ? (showEncryptionParameter ? UploadCommandEncryptionFacade.class : UploadCommandFacade.class) : (showEncryptionPar...
[ "@", "Override", "public", "List", "<", "SnowflakeColumnMetadata", ">", "describeColumns", "(", ")", "throws", "Exception", "{", "return", "SnowflakeUtil", ".", "describeFixedViewColumns", "(", "commandType", "==", "CommandType", ".", "UPLOAD", "?", "(", "showEncryp...
Describe the metadata of a fixed view. @return list of column meta data @throws Exception failed to construct list
[ "Describe", "the", "metadata", "of", "a", "fixed", "view", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L2796-L2805
58,315
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.populateStatusRows
private void populateStatusRows() { for (Map.Entry<String, FileMetadata> entry : fileMetadataMap.entrySet()) { FileMetadata fileMetadata = entry.getValue(); if (commandType == CommandType.UPLOAD) { statusRows.add(showEncryptionParameter ? new UploadCommandEncr...
java
private void populateStatusRows() { for (Map.Entry<String, FileMetadata> entry : fileMetadataMap.entrySet()) { FileMetadata fileMetadata = entry.getValue(); if (commandType == CommandType.UPLOAD) { statusRows.add(showEncryptionParameter ? new UploadCommandEncr...
[ "private", "void", "populateStatusRows", "(", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "FileMetadata", ">", "entry", ":", "fileMetadataMap", ".", "entrySet", "(", ")", ")", "{", "FileMetadata", "fileMetadata", "=", "entry", ".", "getV...
Generate status rows for each file
[ "Generate", "status", "rows", "for", "each", "file" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L2829-L2921
58,316
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/Incident.java
Incident.flush
@Override public void flush() { ObjectMapper mapper = ObjectMapperFactory.getObjectMapper(); String dtoDump; URI incidentURI; try { dtoDump = mapper.writeValueAsString(new IncidentV2DTO(this)); } catch (JsonProcessingException ex) { logger.error("Incident registration fa...
java
@Override public void flush() { ObjectMapper mapper = ObjectMapperFactory.getObjectMapper(); String dtoDump; URI incidentURI; try { dtoDump = mapper.writeValueAsString(new IncidentV2DTO(this)); } catch (JsonProcessingException ex) { logger.error("Incident registration fa...
[ "@", "Override", "public", "void", "flush", "(", ")", "{", "ObjectMapper", "mapper", "=", "ObjectMapperFactory", ".", "getObjectMapper", "(", ")", ";", "String", "dtoDump", ";", "URI", "incidentURI", ";", "try", "{", "dtoDump", "=", "mapper", ".", "writeValu...
Sends incident to GS to log
[ "Sends", "incident", "to", "GS", "to", "log" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/Incident.java#L173-L249
58,317
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SFSSLConnectionSocketFactory.java
SFSSLConnectionSocketFactory.decideCipherSuites
private static String[] decideCipherSuites() { String sysCipherSuites = System.getProperty("https.cipherSuites"); String[] cipherSuites = sysCipherSuites != null ? sysCipherSuites.split(",") : // use jdk default cipher suites ((SSLServerSocketFactory) S...
java
private static String[] decideCipherSuites() { String sysCipherSuites = System.getProperty("https.cipherSuites"); String[] cipherSuites = sysCipherSuites != null ? sysCipherSuites.split(",") : // use jdk default cipher suites ((SSLServerSocketFactory) S...
[ "private", "static", "String", "[", "]", "decideCipherSuites", "(", ")", "{", "String", "sysCipherSuites", "=", "System", ".", "getProperty", "(", "\"https.cipherSuites\"", ")", ";", "String", "[", "]", "cipherSuites", "=", "sysCipherSuites", "!=", "null", "?", ...
Decide cipher suites that will be passed into the SSLConnectionSocketFactory @return List of cipher suites.
[ "Decide", "cipher", "suites", "that", "will", "be", "passed", "into", "the", "SSLConnectionSocketFactory" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFSSLConnectionSocketFactory.java#L71-L88
58,318
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java
Telemetry.createTelemetry
public static Telemetry createTelemetry(Connection conn, int flushSize) { try { return createTelemetry(conn.unwrap(SnowflakeConnectionV1.class).getSfSession(), flushSize); } catch (SQLException ex) { logger.debug("input connection is not a SnowflakeConnection"); return null; ...
java
public static Telemetry createTelemetry(Connection conn, int flushSize) { try { return createTelemetry(conn.unwrap(SnowflakeConnectionV1.class).getSfSession(), flushSize); } catch (SQLException ex) { logger.debug("input connection is not a SnowflakeConnection"); return null; ...
[ "public", "static", "Telemetry", "createTelemetry", "(", "Connection", "conn", ",", "int", "flushSize", ")", "{", "try", "{", "return", "createTelemetry", "(", "conn", ".", "unwrap", "(", "SnowflakeConnectionV1", ".", "class", ")", ".", "getSfSession", "(", ")...
Initialize the telemetry connector @param conn connection with the session to use for the connector @param flushSize maximum size of telemetry batch before flush @return a telemetry connector
[ "Initialize", "the", "telemetry", "connector" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java#L105-L116
58,319
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java
Telemetry.addLogToBatch
public void addLogToBatch(TelemetryData log) throws IOException { if (isClosed) { throw new IOException("Telemetry connector is closed"); } if (!isTelemetryEnabled()) { return; // if disable, do nothing } synchronized (locker) { this.logBatch.add(log); } if ...
java
public void addLogToBatch(TelemetryData log) throws IOException { if (isClosed) { throw new IOException("Telemetry connector is closed"); } if (!isTelemetryEnabled()) { return; // if disable, do nothing } synchronized (locker) { this.logBatch.add(log); } if ...
[ "public", "void", "addLogToBatch", "(", "TelemetryData", "log", ")", "throws", "IOException", "{", "if", "(", "isClosed", ")", "{", "throw", "new", "IOException", "(", "\"Telemetry connector is closed\"", ")", ";", "}", "if", "(", "!", "isTelemetryEnabled", "(",...
Add log to batch to be submitted to telemetry. Send batch if forceFlushSize reached @param log entry to add @throws IOException if closed or uploading batch fails
[ "Add", "log", "to", "batch", "to", "be", "submitted", "to", "telemetry", ".", "Send", "batch", "if", "forceFlushSize", "reached" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java#L160-L180
58,320
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java
Telemetry.tryAddLogToBatch
public void tryAddLogToBatch(TelemetryData log) { try { addLogToBatch(log); } catch (IOException ex) { logger.debug("Exception encountered while sending metrics to telemetry endpoint.", ex); } }
java
public void tryAddLogToBatch(TelemetryData log) { try { addLogToBatch(log); } catch (IOException ex) { logger.debug("Exception encountered while sending metrics to telemetry endpoint.", ex); } }
[ "public", "void", "tryAddLogToBatch", "(", "TelemetryData", "log", ")", "{", "try", "{", "addLogToBatch", "(", "log", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "logger", ".", "debug", "(", "\"Exception encountered while sending metrics to telemet...
Attempt to add log to batch, and suppress exceptions thrown in case of failure @param log entry to add
[ "Attempt", "to", "add", "log", "to", "batch", "and", "suppress", "exceptions", "thrown", "in", "case", "of", "failure" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java#L202-L212
58,321
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java
Telemetry.close
public void close() throws IOException { if (isClosed) { throw new IOException("Telemetry connector is closed"); } try { this.sendBatch(); } catch (IOException e) { logger.error("Send logs failed on closing", e); } finally { this.isClosed = true; ...
java
public void close() throws IOException { if (isClosed) { throw new IOException("Telemetry connector is closed"); } try { this.sendBatch(); } catch (IOException e) { logger.error("Send logs failed on closing", e); } finally { this.isClosed = true; ...
[ "public", "void", "close", "(", ")", "throws", "IOException", "{", "if", "(", "isClosed", ")", "{", "throw", "new", "IOException", "(", "\"Telemetry connector is closed\"", ")", ";", "}", "try", "{", "this", ".", "sendBatch", "(", ")", ";", "}", "catch", ...
Close telemetry connector and send any unsubmitted logs @throws IOException if closed or uploading batch fails
[ "Close", "telemetry", "connector", "and", "send", "any", "unsubmitted", "logs" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java#L219-L237
58,322
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java
Telemetry.sendBatch
public boolean sendBatch() throws IOException { if (isClosed) { throw new IOException("Telemetry connector is closed"); } if (!isTelemetryEnabled()) { return false; } LinkedList<TelemetryData> tmpList; synchronized (locker) { tmpList = this.logBatch; this.l...
java
public boolean sendBatch() throws IOException { if (isClosed) { throw new IOException("Telemetry connector is closed"); } if (!isTelemetryEnabled()) { return false; } LinkedList<TelemetryData> tmpList; synchronized (locker) { tmpList = this.logBatch; this.l...
[ "public", "boolean", "sendBatch", "(", ")", "throws", "IOException", "{", "if", "(", "isClosed", ")", "{", "throw", "new", "IOException", "(", "\"Telemetry connector is closed\"", ")", ";", "}", "if", "(", "!", "isTelemetryEnabled", "(", ")", ")", "{", "retu...
Send all cached logs to server @return whether the logs were sent successfully @throws IOException if closed or uploading batch fails
[ "Send", "all", "cached", "logs", "to", "server" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java#L255-L305
58,323
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java
Telemetry.logsToJson
static ObjectNode logsToJson(LinkedList<TelemetryData> telemetryData) { ObjectNode node = mapper.createObjectNode(); ArrayNode logs = mapper.createArrayNode(); for (TelemetryData data : telemetryData) { logs.add(data.toJson()); } node.set("logs", logs); return node; }
java
static ObjectNode logsToJson(LinkedList<TelemetryData> telemetryData) { ObjectNode node = mapper.createObjectNode(); ArrayNode logs = mapper.createArrayNode(); for (TelemetryData data : telemetryData) { logs.add(data.toJson()); } node.set("logs", logs); return node; }
[ "static", "ObjectNode", "logsToJson", "(", "LinkedList", "<", "TelemetryData", ">", "telemetryData", ")", "{", "ObjectNode", "node", "=", "mapper", ".", "createObjectNode", "(", ")", ";", "ArrayNode", "logs", "=", "mapper", ".", "createArrayNode", "(", ")", ";...
convert a list of log to a JSON object @param telemetryData a list of log @return the result json string
[ "convert", "a", "list", "of", "log", "to", "a", "JSON", "object" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/telemetry/Telemetry.java#L340-L351
58,324
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeStatementV1.java
SnowflakeStatementV1.executeQuery
@Override public ResultSet executeQuery(String sql) throws SQLException { raiseSQLExceptionIfStatementIsClosed(); return executeQueryInternal(sql, null); }
java
@Override public ResultSet executeQuery(String sql) throws SQLException { raiseSQLExceptionIfStatementIsClosed(); return executeQueryInternal(sql, null); }
[ "@", "Override", "public", "ResultSet", "executeQuery", "(", "String", "sql", ")", "throws", "SQLException", "{", "raiseSQLExceptionIfStatementIsClosed", "(", ")", ";", "return", "executeQueryInternal", "(", "sql", ",", "null", ")", ";", "}" ]
Execute SQL query @param sql sql statement @return ResultSet @throws SQLException if @link{#executeQueryInternal(String, Map)} throws an exception
[ "Execute", "SQL", "query" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeStatementV1.java#L159-L164
58,325
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeStatementV1.java
SnowflakeStatementV1.executeQueryInternal
ResultSet executeQueryInternal( String sql, Map<String, ParameterBindingDTO> parameterBindings) throws SQLException { SFBaseResultSet sfResultSet; try { sfResultSet = sfStatement.execute(sql, parameterBindings, SFStatement.CallingMethod.EXECUTE_Q...
java
ResultSet executeQueryInternal( String sql, Map<String, ParameterBindingDTO> parameterBindings) throws SQLException { SFBaseResultSet sfResultSet; try { sfResultSet = sfStatement.execute(sql, parameterBindings, SFStatement.CallingMethod.EXECUTE_Q...
[ "ResultSet", "executeQueryInternal", "(", "String", "sql", ",", "Map", "<", "String", ",", "ParameterBindingDTO", ">", "parameterBindings", ")", "throws", "SQLException", "{", "SFBaseResultSet", "sfResultSet", ";", "try", "{", "sfResultSet", "=", "sfStatement", ".",...
Internal method for executing a query with bindings accepted. @param sql sql statement @param parameterBindings parameters bindings @return query result set @throws SQLException if @link{SFStatement.execute(String)} throws exception
[ "Internal", "method", "for", "executing", "a", "query", "with", "bindings", "accepted", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeStatementV1.java#L232-L257
58,326
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeStatementV1.java
SnowflakeStatementV1.setParameter
void setParameter(String name, Object value) throws Exception { logger.debug("public void setParameter"); try { if (this.sfStatement != null) { this.sfStatement.addProperty(name, value); } } catch (SFException ex) { throw new SnowflakeSQLException(ex); } ...
java
void setParameter(String name, Object value) throws Exception { logger.debug("public void setParameter"); try { if (this.sfStatement != null) { this.sfStatement.addProperty(name, value); } } catch (SFException ex) { throw new SnowflakeSQLException(ex); } ...
[ "void", "setParameter", "(", "String", "name", ",", "Object", "value", ")", "throws", "Exception", "{", "logger", ".", "debug", "(", "\"public void setParameter\"", ")", ";", "try", "{", "if", "(", "this", ".", "sfStatement", "!=", "null", ")", "{", "this"...
Sets a parameter at the statement level. Used for internal testing. @param name parameter name. @param value parameter value. @throws Exception if any SQL error occurs.
[ "Sets", "a", "parameter", "at", "the", "statement", "level", ".", "Used", "for", "internal", "testing", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeStatementV1.java#L766-L781
58,327
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java
SnowflakeChunkDownloader.createChunkDownloaderExecutorService
private static ThreadPoolExecutor createChunkDownloaderExecutorService( final String threadNamePrefix, final int parallel) { ThreadFactory threadFactory = new ThreadFactory() { private int threadCount = 1; public Thread newThread(final Runnable r) { final Thread thread = new T...
java
private static ThreadPoolExecutor createChunkDownloaderExecutorService( final String threadNamePrefix, final int parallel) { ThreadFactory threadFactory = new ThreadFactory() { private int threadCount = 1; public Thread newThread(final Runnable r) { final Thread thread = new T...
[ "private", "static", "ThreadPoolExecutor", "createChunkDownloaderExecutorService", "(", "final", "String", "threadNamePrefix", ",", "final", "int", "parallel", ")", "{", "ThreadFactory", "threadFactory", "=", "new", "ThreadFactory", "(", ")", "{", "private", "int", "t...
Create a pool of downloader threads. @param threadNamePrefix name of threads in pool @param parallel number of thread in pool @return new thread pool
[ "Create", "a", "pool", "of", "downloader", "threads", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java#L154-L184
58,328
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java
SnowflakeChunkDownloader.startNextDownloaders
private void startNextDownloaders() throws SnowflakeSQLException { long waitingTime = BASE_WAITING_MS; // submit the chunks to be downloaded up to the prefetch slot capacity // and limited by memory while (nextChunkToDownload - nextChunkToConsume < prefetchSlots && nextChunkToDownload < ch...
java
private void startNextDownloaders() throws SnowflakeSQLException { long waitingTime = BASE_WAITING_MS; // submit the chunks to be downloaded up to the prefetch slot capacity // and limited by memory while (nextChunkToDownload - nextChunkToConsume < prefetchSlots && nextChunkToDownload < ch...
[ "private", "void", "startNextDownloaders", "(", ")", "throws", "SnowflakeSQLException", "{", "long", "waitingTime", "=", "BASE_WAITING_MS", ";", "// submit the chunks to be downloaded up to the prefetch slot capacity", "// and limited by memory", "while", "(", "nextChunkToDownload"...
Submit download chunk tasks to executor. Number depends on thread and memory limit
[ "Submit", "download", "chunk", "tasks", "to", "executor", ".", "Number", "depends", "on", "thread", "and", "memory", "limit" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java#L310-L414
58,329
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java
SnowflakeChunkDownloader.releaseAllChunkMemoryUsage
public void releaseAllChunkMemoryUsage() { if (chunks == null || chunks.size() == 0) { return; } for (int i = 0; i < chunks.size(); i++) { releaseCurrentMemoryUsage(i, chunks.get(i).computeNeededChunkMemory()); } }
java
public void releaseAllChunkMemoryUsage() { if (chunks == null || chunks.size() == 0) { return; } for (int i = 0; i < chunks.size(); i++) { releaseCurrentMemoryUsage(i, chunks.get(i).computeNeededChunkMemory()); } }
[ "public", "void", "releaseAllChunkMemoryUsage", "(", ")", "{", "if", "(", "chunks", "==", "null", "||", "chunks", ".", "size", "(", ")", "==", "0", ")", "{", "return", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "chunks", ".", "siz...
release all existing chunk memory usage before close
[ "release", "all", "existing", "chunk", "memory", "usage", "before", "close" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java#L436-L447
58,330
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java
SnowflakeChunkDownloader.logOutOfMemoryError
private void logOutOfMemoryError() { logger.error("Dump some crucial information below:\n" + "Total milliseconds waiting for chunks: {},\n" + "Total memory used: {}, Max heap size: {}, total download time: {} millisec,\n" + "total parsing time: {} milliseconds, t...
java
private void logOutOfMemoryError() { logger.error("Dump some crucial information below:\n" + "Total milliseconds waiting for chunks: {},\n" + "Total memory used: {}, Max heap size: {}, total download time: {} millisec,\n" + "total parsing time: {} milliseconds, t...
[ "private", "void", "logOutOfMemoryError", "(", ")", "{", "logger", ".", "error", "(", "\"Dump some crucial information below:\\n\"", "+", "\"Total milliseconds waiting for chunks: {},\\n\"", "+", "\"Total memory used: {}, Max heap size: {}, total download time: {} millisec,\\n\"", "+",...
log out of memory error and provide the suggestion to avoid this error
[ "log", "out", "of", "memory", "error", "and", "provide", "the", "suggestion", "to", "avoid", "this", "error" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java#L611-L630
58,331
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java
SnowflakeChunkDownloader.terminate
public Metrics terminate() { if (!terminated) { logger.debug("Total milliseconds waiting for chunks: {}, " + "Total memory used: {}, total download time: {} millisec, " + "total parsing time: {} milliseconds, total chunks: {}", numberMillisWaitin...
java
public Metrics terminate() { if (!terminated) { logger.debug("Total milliseconds waiting for chunks: {}, " + "Total memory used: {}, total download time: {} millisec, " + "total parsing time: {} milliseconds, total chunks: {}", numberMillisWaitin...
[ "public", "Metrics", "terminate", "(", ")", "{", "if", "(", "!", "terminated", ")", "{", "logger", ".", "debug", "(", "\"Total milliseconds waiting for chunks: {}, \"", "+", "\"Total memory used: {}, total download time: {} millisec, \"", "+", "\"total parsing time: {} millis...
terminate the downloader @return chunk downloader metrics collected over instance lifetime
[ "terminate", "the", "downloader" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeChunkDownloader.java#L637-L661
58,332
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/util/SecretDetector.java
SecretDetector.maskAWSSecret
public static String maskAWSSecret(String sql) { List<SecretDetector.SecretRange> secretRanges = SecretDetector.getAWSSecretPos(sql); for (SecretDetector.SecretRange secretRange : secretRanges) { sql = maskText(sql, secretRange.beginPos, secretRange.endPos); } return sql; }
java
public static String maskAWSSecret(String sql) { List<SecretDetector.SecretRange> secretRanges = SecretDetector.getAWSSecretPos(sql); for (SecretDetector.SecretRange secretRange : secretRanges) { sql = maskText(sql, secretRange.beginPos, secretRange.endPos); } return sql; }
[ "public", "static", "String", "maskAWSSecret", "(", "String", "sql", ")", "{", "List", "<", "SecretDetector", ".", "SecretRange", ">", "secretRanges", "=", "SecretDetector", ".", "getAWSSecretPos", "(", "sql", ")", ";", "for", "(", "SecretDetector", ".", "Secr...
mask AWS secret in the input string @param sql @return masked string
[ "mask", "AWS", "secret", "in", "the", "input", "string" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/util/SecretDetector.java#L136-L145
58,333
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SFStatement.java
SFStatement.sanityCheckQuery
private void sanityCheckQuery(String sql) throws SQLException { if (sql == null || sql.isEmpty()) { throw new SnowflakeSQLException(SqlState.SQL_STATEMENT_NOT_YET_COMPLETE, ErrorCode.INVALID_SQL.getMessageCode(), sql); } }
java
private void sanityCheckQuery(String sql) throws SQLException { if (sql == null || sql.isEmpty()) { throw new SnowflakeSQLException(SqlState.SQL_STATEMENT_NOT_YET_COMPLETE, ErrorCode.INVALID_SQL.getMessageCode(), sql); } }
[ "private", "void", "sanityCheckQuery", "(", "String", "sql", ")", "throws", "SQLException", "{", "if", "(", "sql", "==", "null", "||", "sql", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "SnowflakeSQLException", "(", "SqlState", ".", "SQL_STATEMENT_NO...
Sanity check query text @param sql The SQL statement to check @throws SQLException
[ "Sanity", "check", "query", "text" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFStatement.java#L135-L143
58,334
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SFStatement.java
SFStatement.executeQuery
private SFBaseResultSet executeQuery( String sql, Map<String, ParameterBindingDTO> parametersBinding, boolean describeOnly, CallingMethod caller) throws SQLException, SFException { sanityCheckQuery(sql); String trimmedSql = sql.trim(); // snowflake specific client side commands...
java
private SFBaseResultSet executeQuery( String sql, Map<String, ParameterBindingDTO> parametersBinding, boolean describeOnly, CallingMethod caller) throws SQLException, SFException { sanityCheckQuery(sql); String trimmedSql = sql.trim(); // snowflake specific client side commands...
[ "private", "SFBaseResultSet", "executeQuery", "(", "String", "sql", ",", "Map", "<", "String", ",", "ParameterBindingDTO", ">", "parametersBinding", ",", "boolean", "describeOnly", ",", "CallingMethod", "caller", ")", "throws", "SQLException", ",", "SFException", "{...
Execute SQL query with an option for describe only @param sql sql statement @param describeOnly true if describe only @return query result set @throws SQLException if connection is already closed @throws SFException if result set is null
[ "Execute", "SQL", "query", "with", "an", "option", "for", "describe", "only" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFStatement.java#L154-L182
58,335
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SFStatement.java
SFStatement.describe
public SFStatementMetaData describe(String sql) throws SFException, SQLException { SFBaseResultSet baseResultSet = executeQuery(sql, null, true, null); describeJobUUID = baseResultSet.getQueryId(); return new SFStatementMetaData(baseResultSet.getMetaData(), baseResultS...
java
public SFStatementMetaData describe(String sql) throws SFException, SQLException { SFBaseResultSet baseResultSet = executeQuery(sql, null, true, null); describeJobUUID = baseResultSet.getQueryId(); return new SFStatementMetaData(baseResultSet.getMetaData(), baseResultS...
[ "public", "SFStatementMetaData", "describe", "(", "String", "sql", ")", "throws", "SFException", ",", "SQLException", "{", "SFBaseResultSet", "baseResultSet", "=", "executeQuery", "(", "sql", ",", "null", ",", "true", ",", "null", ")", ";", "describeJobUUID", "=...
Describe a statement @param sql statement @return metadata of statement including result set metadata and binding information @throws SQLException if connection is already closed @throws SFException if result set is null
[ "Describe", "a", "statement" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFStatement.java#L192-L202
58,336
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SFStatement.java
SFStatement.setTimeBomb
private void setTimeBomb(ScheduledExecutorService executor) { class TimeBombTask implements Callable<Void> { private final SFStatement statement; private TimeBombTask(SFStatement statement) { this.statement = statement; } @Override public Void call() throws SQLEx...
java
private void setTimeBomb(ScheduledExecutorService executor) { class TimeBombTask implements Callable<Void> { private final SFStatement statement; private TimeBombTask(SFStatement statement) { this.statement = statement; } @Override public Void call() throws SQLEx...
[ "private", "void", "setTimeBomb", "(", "ScheduledExecutorService", "executor", ")", "{", "class", "TimeBombTask", "implements", "Callable", "<", "Void", ">", "{", "private", "final", "SFStatement", "statement", ";", "private", "TimeBombTask", "(", "SFStatement", "st...
Set a time bomb to cancel the outstanding query when timeout is reached. @param executor object to execute statement cancel request
[ "Set", "a", "time", "bomb", "to", "cancel", "the", "outstanding", "query", "when", "timeout", "is", "reached", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFStatement.java#L316-L346
58,337
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SFStatement.java
SFStatement.cancelHelper
private void cancelHelper(String sql, String mediaType) throws SnowflakeSQLException, SFException { synchronized (this) { if (isClosed) { throw new SFException(ErrorCode.INTERNAL_ERROR, "statement already closed"); } } StmtUtil.StmtInput stmtI...
java
private void cancelHelper(String sql, String mediaType) throws SnowflakeSQLException, SFException { synchronized (this) { if (isClosed) { throw new SFException(ErrorCode.INTERNAL_ERROR, "statement already closed"); } } StmtUtil.StmtInput stmtI...
[ "private", "void", "cancelHelper", "(", "String", "sql", ",", "String", "mediaType", ")", "throws", "SnowflakeSQLException", ",", "SFException", "{", "synchronized", "(", "this", ")", "{", "if", "(", "isClosed", ")", "{", "throw", "new", "SFException", "(", ...
A helper method to build URL and cancel the SQL for exec @param sql sql statement @param mediaType media type @throws SnowflakeSQLException if failed to cancel the statement @throws SFException if statement is already closed
[ "A", "helper", "method", "to", "build", "URL", "and", "cancel", "the", "SQL", "for", "exec" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFStatement.java#L601-L633
58,338
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SFStatement.java
SFStatement.getMoreResults
public boolean getMoreResults(int current) throws SQLException { // clean up current result, if exists if (resultSet != null && (current == Statement.CLOSE_CURRENT_RESULT || current == Statement.CLOSE_ALL_RESULTS)) { resultSet.close(); } resultSet = null; // verify if m...
java
public boolean getMoreResults(int current) throws SQLException { // clean up current result, if exists if (resultSet != null && (current == Statement.CLOSE_CURRENT_RESULT || current == Statement.CLOSE_ALL_RESULTS)) { resultSet.close(); } resultSet = null; // verify if m...
[ "public", "boolean", "getMoreResults", "(", "int", "current", ")", "throws", "SQLException", "{", "// clean up current result, if exists", "if", "(", "resultSet", "!=", "null", "&&", "(", "current", "==", "Statement", ".", "CLOSE_CURRENT_RESULT", "||", "current", "=...
Sets the result set to the next one, if available. @param current What to do with the current result. One of Statement.CLOSE_CURRENT_RESULT, Statement.CLOSE_ALL_RESULTS, or Statement.KEEP_CURRENT_RESULT @return true if there is a next result and it's a result set false if there are no more results, or there is a next ...
[ "Sets", "the", "result", "set", "to", "the", "next", "one", "if", "available", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFStatement.java#L877-L913
58,339
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/cloud/storage/StorageProviderException.java
StorageProviderException.isServiceException404
public boolean isServiceException404() { if ((Exception) this instanceof AmazonServiceException) { AmazonServiceException asEx = (AmazonServiceException) ((java.lang.Exception) this); return (asEx.getStatusCode() == HttpStatus.SC_NOT_FOUND); } return false; }
java
public boolean isServiceException404() { if ((Exception) this instanceof AmazonServiceException) { AmazonServiceException asEx = (AmazonServiceException) ((java.lang.Exception) this); return (asEx.getStatusCode() == HttpStatus.SC_NOT_FOUND); } return false; }
[ "public", "boolean", "isServiceException404", "(", ")", "{", "if", "(", "(", "Exception", ")", "this", "instanceof", "AmazonServiceException", ")", "{", "AmazonServiceException", "asEx", "=", "(", "AmazonServiceException", ")", "(", "(", "java", ".", "lang", "."...
Returns true if this is an exception corresponding to a HTTP 404 error returned by the storage provider @return true if the specified exception is an AmazonServiceException instance and if it was thrown because of a 404, false otherwise.
[ "Returns", "true", "if", "this", "is", "an", "exception", "corresponding", "to", "a", "HTTP", "404", "error", "returned", "by", "the", "storage", "provider" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/StorageProviderException.java#L45-L54
58,340
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/IncidentUtil.java
IncidentUtil.oneLiner
public static String oneLiner(Throwable thrown) { StackTraceElement[] stack = thrown.getStackTrace(); String topOfStack = null; if (stack.length > 0) { topOfStack = " at " + stack[0]; } return thrown.toString() + topOfStack; }
java
public static String oneLiner(Throwable thrown) { StackTraceElement[] stack = thrown.getStackTrace(); String topOfStack = null; if (stack.length > 0) { topOfStack = " at " + stack[0]; } return thrown.toString() + topOfStack; }
[ "public", "static", "String", "oneLiner", "(", "Throwable", "thrown", ")", "{", "StackTraceElement", "[", "]", "stack", "=", "thrown", ".", "getStackTrace", "(", ")", ";", "String", "topOfStack", "=", "null", ";", "if", "(", "stack", ".", "length", ">", ...
Produce a one line description of the throwable, suitable for error message and log printing. @param thrown thrown object @return description of the thrown object
[ "Produce", "a", "one", "line", "description", "of", "the", "throwable", "suitable", "for", "error", "message", "and", "log", "printing", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/IncidentUtil.java#L54-L63
58,341
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/IncidentUtil.java
IncidentUtil.dumpVmMetrics
public static void dumpVmMetrics(String incidentId) { PrintWriter writer = null; try { String dumpFile = EventUtil.getDumpPathPrefix() + "/" + INC_DUMP_FILE_NAME + incidentId + INC_DUMP_FILE_EXT; final OutputStream outStream = new GZIPOutputStream(new FileOut...
java
public static void dumpVmMetrics(String incidentId) { PrintWriter writer = null; try { String dumpFile = EventUtil.getDumpPathPrefix() + "/" + INC_DUMP_FILE_NAME + incidentId + INC_DUMP_FILE_EXT; final OutputStream outStream = new GZIPOutputStream(new FileOut...
[ "public", "static", "void", "dumpVmMetrics", "(", "String", "incidentId", ")", "{", "PrintWriter", "writer", "=", "null", ";", "try", "{", "String", "dumpFile", "=", "EventUtil", ".", "getDumpPathPrefix", "(", ")", "+", "\"/\"", "+", "INC_DUMP_FILE_NAME", "+",...
Dumps JVM metrics for this process. @param incidentId incident id
[ "Dumps", "JVM", "metrics", "for", "this", "process", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/IncidentUtil.java#L83-L151
58,342
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/IncidentUtil.java
IncidentUtil.generateIncidentV2WithException
public static Throwable generateIncidentV2WithException(SFSession session, Throwable exc, String jobId, String requestId) { new Incident(ses...
java
public static Throwable generateIncidentV2WithException(SFSession session, Throwable exc, String jobId, String requestId) { new Incident(ses...
[ "public", "static", "Throwable", "generateIncidentV2WithException", "(", "SFSession", "session", ",", "Throwable", "exc", ",", "String", "jobId", ",", "String", "requestId", ")", "{", "new", "Incident", "(", "session", ",", "exc", ",", "jobId", ",", "requestId",...
Makes a V2 incident object and triggers ir, effectively reporting the given exception to GS and possibly to crashmanager @param session SFSession object to talk to GS through @param exc the Throwable we should report @param jobId jobId that failed @param requestId requestId that failed @return the given Th...
[ "Makes", "a", "V2", "incident", "object", "and", "triggers", "ir", "effectively", "reporting", "the", "given", "exception", "to", "GS", "and", "possibly", "to", "crashmanager" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/IncidentUtil.java#L279-L286
58,343
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/util/SFTimestamp.java
SFTimestamp.getUTCNow
public static String getUTCNow() { SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT")); //Time in GMT return dateFormatGmt.format(new Date()); }
java
public static String getUTCNow() { SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT")); //Time in GMT return dateFormatGmt.format(new Date()); }
[ "public", "static", "String", "getUTCNow", "(", ")", "{", "SimpleDateFormat", "dateFormatGmt", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd HH:mm:ss\"", ")", ";", "dateFormatGmt", ".", "setTimeZone", "(", "TimeZone", ".", "getTimeZone", "(", "\"GMT\"", ")", ...
Get current time in UTC in the following format @return String representation in this format: yyyy-MM-dd HH:mm:ss
[ "Get", "current", "time", "in", "UTC", "in", "the", "following", "format" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/util/SFTimestamp.java#L17-L24
58,344
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java
SnowflakeAzureClient.renew
@Override public void renew(Map stageCredentials) throws SnowflakeSQLException { stageInfo.setCredentials(stageCredentials); setupAzureClient(stageInfo, encMat); }
java
@Override public void renew(Map stageCredentials) throws SnowflakeSQLException { stageInfo.setCredentials(stageCredentials); setupAzureClient(stageInfo, encMat); }
[ "@", "Override", "public", "void", "renew", "(", "Map", "stageCredentials", ")", "throws", "SnowflakeSQLException", "{", "stageInfo", ".", "setCredentials", "(", "stageCredentials", ")", ";", "setupAzureClient", "(", "stageInfo", ",", "encMat", ")", ";", "}" ]
Re-creates the encapsulated storage client with a fresh access token @param stageCredentials a Map (as returned by GS) which contains the new credential properties @throws SnowflakeSQLException failure to renew the client
[ "Re", "-", "creates", "the", "encapsulated", "storage", "client", "with", "a", "fresh", "access", "token" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java#L205-L210
58,345
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java
SnowflakeAzureClient.getObjectMetadata
@Override public StorageObjectMetadata getObjectMetadata(String remoteStorageLocation, String prefix) throws StorageProviderException { AzureObjectMetadata azureObjectMetadata = null; try { // Get a reference to the BLOB, to retrieve its metadata CloudBlobContainer container = azStorageCli...
java
@Override public StorageObjectMetadata getObjectMetadata(String remoteStorageLocation, String prefix) throws StorageProviderException { AzureObjectMetadata azureObjectMetadata = null; try { // Get a reference to the BLOB, to retrieve its metadata CloudBlobContainer container = azStorageCli...
[ "@", "Override", "public", "StorageObjectMetadata", "getObjectMetadata", "(", "String", "remoteStorageLocation", ",", "String", "prefix", ")", "throws", "StorageProviderException", "{", "AzureObjectMetadata", "azureObjectMetadata", "=", "null", ";", "try", "{", "// Get a ...
Returns the metadata properties for a remote storage object @param remoteStorageLocation location, i.e. bucket for S3 @param prefix the prefix/path of the object to retrieve @return storage metadata object @throws StorageProviderException azure storage exception
[ "Returns", "the", "metadata", "properties", "for", "a", "remote", "storage", "object" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java#L259-L295
58,346
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java
SnowflakeAzureClient.download
@Override public void download(SFSession connection, String command, String localLocation, String destFileName, int parallelism, String remoteStorageLocation, String stageFilePath, String stageRegion) throws SnowflakeSQLException { int retryCount = 0; do { try { ...
java
@Override public void download(SFSession connection, String command, String localLocation, String destFileName, int parallelism, String remoteStorageLocation, String stageFilePath, String stageRegion) throws SnowflakeSQLException { int retryCount = 0; do { try { ...
[ "@", "Override", "public", "void", "download", "(", "SFSession", "connection", ",", "String", "command", ",", "String", "localLocation", ",", "String", "destFileName", ",", "int", "parallelism", ",", "String", "remoteStorageLocation", ",", "String", "stageFilePath",...
Download a file from remote storage. @param connection connection object @param command command to download file @param localLocation local file path @param destFileName destination file name @param parallelism [ not used by the Azure implementation ] @param remoteSt...
[ "Download", "a", "file", "from", "remote", "storage", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java#L310-L376
58,347
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java
SnowflakeAzureClient.handleAzureException
private static void handleAzureException( Exception ex, int retryCount, String operation, SFSession connection, String command, SnowflakeAzureClient azClient) throws SnowflakeSQLException { // no need to retry if it is invalid key exception if (ex.getCause() instanceof I...
java
private static void handleAzureException( Exception ex, int retryCount, String operation, SFSession connection, String command, SnowflakeAzureClient azClient) throws SnowflakeSQLException { // no need to retry if it is invalid key exception if (ex.getCause() instanceof I...
[ "private", "static", "void", "handleAzureException", "(", "Exception", "ex", ",", "int", "retryCount", ",", "String", "operation", ",", "SFSession", "connection", ",", "String", "command", ",", "SnowflakeAzureClient", "azClient", ")", "throws", "SnowflakeSQLException"...
Handles exceptions thrown by Azure Storage It will retry transient errors as defined by the Azure Client retry policy It will re-create the client if the SAS token has expired, and re-try @param ex the exception to handle @param retryCount current number of retries, incremented by the caller before each call @...
[ "Handles", "exceptions", "thrown", "by", "Azure", "Storage", "It", "will", "retry", "transient", "errors", "as", "defined", "by", "the", "Azure", "Client", "retry", "policy", "It", "will", "re", "-", "create", "the", "client", "if", "the", "SAS", "token", ...
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java#L662-L762
58,348
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java
SnowflakeAzureClient.addDigestMetadata
@Override public void addDigestMetadata(StorageObjectMetadata meta, String digest) { if (!SnowflakeUtil.isBlank(digest)) { // Azure doesn't allow hyphens in the name of a metadata field. meta.addUserMetadata("sfcdigest", digest); } }
java
@Override public void addDigestMetadata(StorageObjectMetadata meta, String digest) { if (!SnowflakeUtil.isBlank(digest)) { // Azure doesn't allow hyphens in the name of a metadata field. meta.addUserMetadata("sfcdigest", digest); } }
[ "@", "Override", "public", "void", "addDigestMetadata", "(", "StorageObjectMetadata", "meta", ",", "String", "digest", ")", "{", "if", "(", "!", "SnowflakeUtil", ".", "isBlank", "(", "digest", ")", ")", "{", "// Azure doesn't allow hyphens in the name of a metadata fi...
Adds digest metadata to the StorageObjectMetadata object
[ "Adds", "digest", "metadata", "to", "the", "StorageObjectMetadata", "object" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java#L857-L865
58,349
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.initMemoryLimit
private static long initMemoryLimit(final ResultOutput resultOutput) { // default setting long memoryLimit = SessionUtil.DEFAULT_CLIENT_MEMORY_LIMIT * 1024 * 1024; if (resultOutput.parameters.get(CLIENT_MEMORY_LIMIT) != null) { // use the settings from the customer memoryLimit = ...
java
private static long initMemoryLimit(final ResultOutput resultOutput) { // default setting long memoryLimit = SessionUtil.DEFAULT_CLIENT_MEMORY_LIMIT * 1024 * 1024; if (resultOutput.parameters.get(CLIENT_MEMORY_LIMIT) != null) { // use the settings from the customer memoryLimit = ...
[ "private", "static", "long", "initMemoryLimit", "(", "final", "ResultOutput", "resultOutput", ")", "{", "// default setting", "long", "memoryLimit", "=", "SessionUtil", ".", "DEFAULT_CLIENT_MEMORY_LIMIT", "*", "1024", "*", "1024", ";", "if", "(", "resultOutput", "."...
initialize memory limit in bytes @param resultOutput @return memory limit in bytes
[ "initialize", "memory", "limit", "in", "bytes" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L485-L510
58,350
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.effectiveParamValue
static private Object effectiveParamValue( Map<String, Object> parameters, String paramName) { String upper = paramName.toUpperCase(); Object value = parameters.get(upper); if (value != null) { return value; } value = defaultParameters.get(upper); if (value != null) ...
java
static private Object effectiveParamValue( Map<String, Object> parameters, String paramName) { String upper = paramName.toUpperCase(); Object value = parameters.get(upper); if (value != null) { return value; } value = defaultParameters.get(upper); if (value != null) ...
[ "static", "private", "Object", "effectiveParamValue", "(", "Map", "<", "String", ",", "Object", ">", "parameters", ",", "String", "paramName", ")", "{", "String", "upper", "=", "paramName", ".", "toUpperCase", "(", ")", ";", "Object", "value", "=", "paramete...
Returns the effective parameter value, using the value explicitly provided in parameters, or the default if absent @param parameters keyed in parameter name and valued in parameter value @param paramName Parameter to return the value of @return Effective value
[ "Returns", "the", "effective", "parameter", "value", "using", "the", "value", "explicitly", "provided", "in", "parameters", "or", "the", "default", "if", "absent" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L544-L564
58,351
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.specializedFormatter
static private SnowflakeDateTimeFormat specializedFormatter( Map<String, Object> parameters, String id, String param, String defaultFormat) { String sqlFormat = SnowflakeDateTimeFormat.effectiveSpecializedTimestampFormat( (String) effectiveParamValue(parameters, param),...
java
static private SnowflakeDateTimeFormat specializedFormatter( Map<String, Object> parameters, String id, String param, String defaultFormat) { String sqlFormat = SnowflakeDateTimeFormat.effectiveSpecializedTimestampFormat( (String) effectiveParamValue(parameters, param),...
[ "static", "private", "SnowflakeDateTimeFormat", "specializedFormatter", "(", "Map", "<", "String", ",", "Object", ">", "parameters", ",", "String", "id", ",", "String", "param", ",", "String", "defaultFormat", ")", "{", "String", "sqlFormat", "=", "SnowflakeDateTi...
Helper function building a formatter for a specialized timestamp type. Note that it will be based on either the 'param' value if set, or the default format provided.
[ "Helper", "function", "building", "a", "formatter", "for", "a", "specialized", "timestamp", "type", ".", "Note", "that", "it", "will", "be", "based", "on", "either", "the", "param", "value", "if", "set", "or", "the", "default", "format", "provided", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L571-L589
58,352
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.adjustTimestamp
static public Timestamp adjustTimestamp(Timestamp timestamp) { long milliToAdjust = ResultUtil.msDiffJulianToGregorian(timestamp); if (milliToAdjust != 0) { if (logger.isDebugEnabled()) { logger.debug("adjust timestamp by {} days", milliToAdjust / 86400000); } Timestamp ...
java
static public Timestamp adjustTimestamp(Timestamp timestamp) { long milliToAdjust = ResultUtil.msDiffJulianToGregorian(timestamp); if (milliToAdjust != 0) { if (logger.isDebugEnabled()) { logger.debug("adjust timestamp by {} days", milliToAdjust / 86400000); } Timestamp ...
[ "static", "public", "Timestamp", "adjustTimestamp", "(", "Timestamp", "timestamp", ")", "{", "long", "milliToAdjust", "=", "ResultUtil", ".", "msDiffJulianToGregorian", "(", "timestamp", ")", ";", "if", "(", "milliToAdjust", "!=", "0", ")", "{", "if", "(", "lo...
Adjust timestamp for dates before 1582-10-05 @param timestamp needs to be adjusted @return adjusted timestamp
[ "Adjust", "timestamp", "for", "dates", "before", "1582", "-", "10", "-", "05" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L597-L620
58,353
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.msDiffJulianToGregorian
static public long msDiffJulianToGregorian(java.util.Date date) { // get the year of the date Calendar cal = Calendar.getInstance(); cal.setTime(date); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH); int dayOfMonth = cal.get(Calendar.DAY_OF_MONTH); // if date is be...
java
static public long msDiffJulianToGregorian(java.util.Date date) { // get the year of the date Calendar cal = Calendar.getInstance(); cal.setTime(date); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH); int dayOfMonth = cal.get(Calendar.DAY_OF_MONTH); // if date is be...
[ "static", "public", "long", "msDiffJulianToGregorian", "(", "java", ".", "util", ".", "Date", "date", ")", "{", "// get the year of the date", "Calendar", "cal", "=", "Calendar", ".", "getInstance", "(", ")", ";", "cal", ".", "setTime", "(", "date", ")", ";"...
For dates before 1582-10-05, calculate the number of millis to adjust. @param date date before 1582-10-05 @return millis needs to be adjusted
[ "For", "dates", "before", "1582", "-", "10", "-", "05", "calculate", "the", "number", "of", "millis", "to", "adjust", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L628-L663
58,354
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.getSFTimeAsString
static public String getSFTimeAsString( SFTime sft, int scale, SnowflakeDateTimeFormat timeFormatter) { return timeFormatter.format(sft, scale); }
java
static public String getSFTimeAsString( SFTime sft, int scale, SnowflakeDateTimeFormat timeFormatter) { return timeFormatter.format(sft, scale); }
[ "static", "public", "String", "getSFTimeAsString", "(", "SFTime", "sft", ",", "int", "scale", ",", "SnowflakeDateTimeFormat", "timeFormatter", ")", "{", "return", "timeFormatter", ".", "format", "(", "sft", ",", "scale", ")", ";", "}" ]
Convert a time value into a string @param sft snowflake time object @param scale time scale @param timeFormatter time formatter @return time in string
[ "Convert", "a", "time", "value", "into", "a", "string" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L764-L768
58,355
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.getSFTimestampAsString
static public String getSFTimestampAsString( SFTimestamp sfTS, int columnType, int scale, SnowflakeDateTimeFormat timestampNTZFormatter, SnowflakeDateTimeFormat timestampLTZFormatter, SnowflakeDateTimeFormat timestampTZFormatter, SFSession session) throws SFException { // Derive the ...
java
static public String getSFTimestampAsString( SFTimestamp sfTS, int columnType, int scale, SnowflakeDateTimeFormat timestampNTZFormatter, SnowflakeDateTimeFormat timestampLTZFormatter, SnowflakeDateTimeFormat timestampTZFormatter, SFSession session) throws SFException { // Derive the ...
[ "static", "public", "String", "getSFTimestampAsString", "(", "SFTimestamp", "sfTS", ",", "int", "columnType", ",", "int", "scale", ",", "SnowflakeDateTimeFormat", "timestampNTZFormatter", ",", "SnowflakeDateTimeFormat", "timestampLTZFormatter", ",", "SnowflakeDateTimeFormat",...
Convert a SFTimestamp to a string value. @param sfTS snowflake timestamp object @param columnType internal snowflake t @param scale timestamp scale @param timestampNTZFormatter snowflake timestamp ntz format @param timestampLTZFormatter snowflake timestamp ltz format @param ...
[ "Convert", "a", "SFTimestamp", "to", "a", "string", "value", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L794-L845
58,356
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.getDateAsString
static public String getDateAsString( Date date, SnowflakeDateTimeFormat dateFormatter) { return dateFormatter.format(date, timeZoneUTC); }
java
static public String getDateAsString( Date date, SnowflakeDateTimeFormat dateFormatter) { return dateFormatter.format(date, timeZoneUTC); }
[ "static", "public", "String", "getDateAsString", "(", "Date", "date", ",", "SnowflakeDateTimeFormat", "dateFormatter", ")", "{", "return", "dateFormatter", ".", "format", "(", "date", ",", "timeZoneUTC", ")", ";", "}" ]
Convert a date value into a string @param date date will be converted @param dateFormatter date format @return date in string
[ "Convert", "a", "date", "value", "into", "a", "string" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L854-L858
58,357
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.adjustDate
static public Date adjustDate(Date date) { long milliToAdjust = ResultUtil.msDiffJulianToGregorian(date); if (milliToAdjust != 0) { // add the difference to the new date return new Date(date.getTime() + milliToAdjust); } else { return date; } }
java
static public Date adjustDate(Date date) { long milliToAdjust = ResultUtil.msDiffJulianToGregorian(date); if (milliToAdjust != 0) { // add the difference to the new date return new Date(date.getTime() + milliToAdjust); } else { return date; } }
[ "static", "public", "Date", "adjustDate", "(", "Date", "date", ")", "{", "long", "milliToAdjust", "=", "ResultUtil", ".", "msDiffJulianToGregorian", "(", "date", ")", ";", "if", "(", "milliToAdjust", "!=", "0", ")", "{", "// add the difference to the new date", ...
Adjust date for before 1582-10-05 @param date date before 1582-10-05 @return adjusted date
[ "Adjust", "date", "for", "before", "1582", "-", "10", "-", "05" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L866-L879
58,358
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.getDate
static public Date getDate(String str, TimeZone tz, SFSession session) throws SFException { try { long milliSecsSinceEpoch = Long.valueOf(str) * 86400000; SFTimestamp tsInUTC = SFTimestamp.fromDate(new Date(milliSecsSinceEpoch), 0, TimeZone.getTime...
java
static public Date getDate(String str, TimeZone tz, SFSession session) throws SFException { try { long milliSecsSinceEpoch = Long.valueOf(str) * 86400000; SFTimestamp tsInUTC = SFTimestamp.fromDate(new Date(milliSecsSinceEpoch), 0, TimeZone.getTime...
[ "static", "public", "Date", "getDate", "(", "String", "str", ",", "TimeZone", "tz", ",", "SFSession", "session", ")", "throws", "SFException", "{", "try", "{", "long", "milliSecsSinceEpoch", "=", "Long", ".", "valueOf", "(", "str", ")", "*", "86400000", ";...
Convert a date internal object to a Date object in specified timezone. @param str snowflake date object @param tz timezone we want convert to @param session snowflake session object @return java date object @throws SFException if date is invalid
[ "Convert", "a", "date", "internal", "object", "to", "a", "Date", "object", "in", "specified", "timezone", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L890-L929
58,359
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.calculateUpdateCount
static public int calculateUpdateCount(SFBaseResultSet resultSet) throws SFException, SQLException { int updateCount = 0; SFStatementType statementType = resultSet.getStatementType(); if (statementType.isDML()) { while (resultSet.next()) { if (statementType == SFStatementType.COP...
java
static public int calculateUpdateCount(SFBaseResultSet resultSet) throws SFException, SQLException { int updateCount = 0; SFStatementType statementType = resultSet.getStatementType(); if (statementType.isDML()) { while (resultSet.next()) { if (statementType == SFStatementType.COP...
[ "static", "public", "int", "calculateUpdateCount", "(", "SFBaseResultSet", "resultSet", ")", "throws", "SFException", ",", "SQLException", "{", "int", "updateCount", "=", "0", ";", "SFStatementType", "statementType", "=", "resultSet", ".", "getStatementType", "(", "...
Calculate number of rows updated given a result set Interpret result format based on result set's statement type @param resultSet result set to extract update count from @return the number of rows updated @throws SFException if failed to calculate update count @throws SQLException if failed to calculate update count
[ "Calculate", "number", "of", "rows", "updated", "given", "a", "result", "set", "Interpret", "result", "format", "based", "on", "result", "set", "s", "statement", "type" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L952-L990
58,360
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.listSearchCaseInsensitive
public static int listSearchCaseInsensitive(List<String> source, String target) { for (int i = 0; i < source.size(); i++) { if (target.equalsIgnoreCase(source.get(i))) { return i; } } return -1; }
java
public static int listSearchCaseInsensitive(List<String> source, String target) { for (int i = 0; i < source.size(); i++) { if (target.equalsIgnoreCase(source.get(i))) { return i; } } return -1; }
[ "public", "static", "int", "listSearchCaseInsensitive", "(", "List", "<", "String", ">", "source", ",", "String", "target", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "source", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", ...
Given a list of String, do a case insensitive search for target string Used by resultsetMetadata to search for target column name @param source source string list @param target target string to match @return index in the source string list that matches the target string index starts from zero
[ "Given", "a", "list", "of", "String", "do", "a", "case", "insensitive", "search", "for", "target", "string", "Used", "by", "resultsetMetadata", "to", "search", "for", "target", "column", "name" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L1001-L1011
58,361
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.getResultIds
private static List<String> getResultIds(JsonNode result) { JsonNode resultIds = result.path("data").path("resultIds"); if (resultIds.isNull() || resultIds.isMissingNode() || resultIds.asText().isEmpty()) { return Collections.emptyList(); } return new ArrayList<>(Arrays.asLis...
java
private static List<String> getResultIds(JsonNode result) { JsonNode resultIds = result.path("data").path("resultIds"); if (resultIds.isNull() || resultIds.isMissingNode() || resultIds.asText().isEmpty()) { return Collections.emptyList(); } return new ArrayList<>(Arrays.asLis...
[ "private", "static", "List", "<", "String", ">", "getResultIds", "(", "JsonNode", "result", ")", "{", "JsonNode", "resultIds", "=", "result", ".", "path", "(", "\"data\"", ")", ".", "path", "(", "\"resultIds\"", ")", ";", "if", "(", "resultIds", ".", "is...
Return the list of result IDs provided in a result, if available; otherwise return an empty list. @param result result json @return list of result IDs which can be used for result scans
[ "Return", "the", "list", "of", "result", "IDs", "provided", "in", "a", "result", "if", "available", ";", "otherwise", "return", "an", "empty", "list", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L1020-L1030
58,362
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.getResultTypes
private static List<SFStatementType> getResultTypes(JsonNode result) { JsonNode resultTypes = result.path("data").path("resultTypes"); if (resultTypes.isNull() || resultTypes.isMissingNode() || resultTypes.asText().isEmpty()) { return Collections.emptyList(); } String[] type...
java
private static List<SFStatementType> getResultTypes(JsonNode result) { JsonNode resultTypes = result.path("data").path("resultTypes"); if (resultTypes.isNull() || resultTypes.isMissingNode() || resultTypes.asText().isEmpty()) { return Collections.emptyList(); } String[] type...
[ "private", "static", "List", "<", "SFStatementType", ">", "getResultTypes", "(", "JsonNode", "result", ")", "{", "JsonNode", "resultTypes", "=", "result", ".", "path", "(", "\"data\"", ")", ".", "path", "(", "\"resultTypes\"", ")", ";", "if", "(", "resultTyp...
Return the list of result types provided in a result, if available; otherwise return an empty list. @param result result json @return list of result IDs which can be used for result scans
[ "Return", "the", "list", "of", "result", "types", "provided", "in", "a", "result", "if", "available", ";", "otherwise", "return", "an", "empty", "list", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L1039-L1058
58,363
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/ResultUtil.java
ResultUtil.getChildResults
public static List<SFChildResult> getChildResults(SFSession session, String requestId, JsonNode result) throws SFException { List<String> ids = getResultIds(result); List<SFStatementType> types = getResul...
java
public static List<SFChildResult> getChildResults(SFSession session, String requestId, JsonNode result) throws SFException { List<String> ids = getResultIds(result); List<SFStatementType> types = getResul...
[ "public", "static", "List", "<", "SFChildResult", ">", "getChildResults", "(", "SFSession", "session", ",", "String", "requestId", ",", "JsonNode", "result", ")", "throws", "SFException", "{", "List", "<", "String", ">", "ids", "=", "getResultIds", "(", "resul...
Return the list of child results provided in a result, if available; otherwise return an empty list @param session the current session @param requestId the current request id @param result result json @return list of child results @throws SFException if the number of child IDs does not match child statement types
[ "Return", "the", "list", "of", "child", "results", "provided", "in", "a", "result", "if", "available", ";", "otherwise", "return", "an", "empty", "list" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/ResultUtil.java#L1071-L1097
58,364
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/loader/BufferStage.java
BufferStage.openFile
private synchronized void openFile() { try { String fName = _directory.getAbsolutePath() + File.separatorChar + StreamLoader.FILE_PREFIX + _stamp + _fileCount; if (_loader._compressDataBeforePut) { fName += StreamLoader.FILE_SUFFIX; } ...
java
private synchronized void openFile() { try { String fName = _directory.getAbsolutePath() + File.separatorChar + StreamLoader.FILE_PREFIX + _stamp + _fileCount; if (_loader._compressDataBeforePut) { fName += StreamLoader.FILE_SUFFIX; } ...
[ "private", "synchronized", "void", "openFile", "(", ")", "{", "try", "{", "String", "fName", "=", "_directory", ".", "getAbsolutePath", "(", ")", "+", "File", ".", "separatorChar", "+", "StreamLoader", ".", "FILE_PREFIX", "+", "_stamp", "+", "_fileCount", ";...
Create local file for caching data before upload
[ "Create", "local", "file", "for", "caching", "data", "before", "upload" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/loader/BufferStage.java#L147-L185
58,365
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/loader/BufferStage.java
BufferStage.stageData
boolean stageData(final byte[] line) throws IOException { if (this._rowCount % 10000 == 0) { LOGGER.debug( "rowCount: {}, currentSize: {}", this._rowCount, _currentSize); } _outstream.write(line); _currentSize += line.length; _outstream.write(newLineBytes); this._rowCount+...
java
boolean stageData(final byte[] line) throws IOException { if (this._rowCount % 10000 == 0) { LOGGER.debug( "rowCount: {}, currentSize: {}", this._rowCount, _currentSize); } _outstream.write(line); _currentSize += line.length; _outstream.write(newLineBytes); this._rowCount+...
[ "boolean", "stageData", "(", "final", "byte", "[", "]", "line", ")", "throws", "IOException", "{", "if", "(", "this", ".", "_rowCount", "%", "10000", "==", "0", ")", "{", "LOGGER", ".", "debug", "(", "\"rowCount: {}, currentSize: {}\"", ",", "this", ".", ...
not thread safe
[ "not", "thread", "safe" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/loader/BufferStage.java#L191-L231
58,366
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/loader/BufferStage.java
BufferStage.completeUploading
void completeUploading() throws IOException { LOGGER.debug("name: {}, currentSize: {}, Threshold: {}," + " fileCount: {}, fileBucketSize: {}", _file.getAbsolutePath(), _currentSize, this._csvFileSize, _fileCount, this._csvFileBucketSize); _o...
java
void completeUploading() throws IOException { LOGGER.debug("name: {}, currentSize: {}, Threshold: {}," + " fileCount: {}, fileBucketSize: {}", _file.getAbsolutePath(), _currentSize, this._csvFileSize, _fileCount, this._csvFileBucketSize); _o...
[ "void", "completeUploading", "(", ")", "throws", "IOException", "{", "LOGGER", ".", "debug", "(", "\"name: {}, currentSize: {}, Threshold: {},\"", "+", "\" fileCount: {}, fileBucketSize: {}\"", ",", "_file", ".", "getAbsolutePath", "(", ")", ",", "_currentSize", ",", "t...
Wait for all files to finish uploading and schedule stage for processing @throws IOException raises an exception if IO error occurs
[ "Wait", "for", "all", "files", "to", "finish", "uploading", "and", "schedule", "stage", "for", "processing" ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/loader/BufferStage.java#L239-L276
58,367
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/loader/BufferStage.java
BufferStage.escapeFileSeparatorChar
private static String escapeFileSeparatorChar(String fname) { if (File.separatorChar == '\\') { return fname.replaceAll(File.separator + File.separator, "_"); } else { return fname.replaceAll(File.separator, "_"); } }
java
private static String escapeFileSeparatorChar(String fname) { if (File.separatorChar == '\\') { return fname.replaceAll(File.separator + File.separator, "_"); } else { return fname.replaceAll(File.separator, "_"); } }
[ "private", "static", "String", "escapeFileSeparatorChar", "(", "String", "fname", ")", "{", "if", "(", "File", ".", "separatorChar", "==", "'", "'", ")", "{", "return", "fname", ".", "replaceAll", "(", "File", ".", "separator", "+", "File", ".", "separator...
Escape file separator char to underscore. This prevents the file name from using file path separator. @param fname @return escaped file name
[ "Escape", "file", "separator", "char", "to", "underscore", ".", "This", "prevents", "the", "file", "name", "from", "using", "file", "path", "separator", "." ]
98567b5a57753f29d51446809640b969a099658f
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/loader/BufferStage.java#L349-L359
58,368
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java
ProxyInvocationHandlerImpl.executeSyncMethod
@CheckForNull private Object executeSyncMethod(Method method, Object[] args) throws ApplicationException { if (preparingForShutdown.get()) { throw new JoynrIllegalStateException("Preparing for shutdown. Only stateless methods can be called."); } return executeMethodWithCaller(met...
java
@CheckForNull private Object executeSyncMethod(Method method, Object[] args) throws ApplicationException { if (preparingForShutdown.get()) { throw new JoynrIllegalStateException("Preparing for shutdown. Only stateless methods can be called."); } return executeMethodWithCaller(met...
[ "@", "CheckForNull", "private", "Object", "executeSyncMethod", "(", "Method", "method", ",", "Object", "[", "]", "args", ")", "throws", "ApplicationException", "{", "if", "(", "preparingForShutdown", ".", "get", "(", ")", ")", "{", "throw", "new", "JoynrIllega...
executeSyncMethod is called whenever a method of the synchronous interface which is provided by the proxy is called. The ProxyInvocationHandler will check the arbitration status before the call is delegated to the connector. If the arbitration is still in progress the synchronous call will block until the arbitration w...
[ "executeSyncMethod", "is", "called", "whenever", "a", "method", "of", "the", "synchronous", "interface", "which", "is", "provided", "by", "the", "proxy", "is", "called", ".", "The", "ProxyInvocationHandler", "will", "check", "the", "arbitration", "status", "before...
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java#L143-L154
58,369
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java
ProxyInvocationHandlerImpl.waitForConnectorFinished
public boolean waitForConnectorFinished() throws InterruptedException { connectorStatusLock.lock(); try { if (connectorStatus == ConnectorStatus.ConnectorSuccesful) { return true; } return connectorSuccessfullyFinished.await(discoveryQos.getDiscoveryT...
java
public boolean waitForConnectorFinished() throws InterruptedException { connectorStatusLock.lock(); try { if (connectorStatus == ConnectorStatus.ConnectorSuccesful) { return true; } return connectorSuccessfullyFinished.await(discoveryQos.getDiscoveryT...
[ "public", "boolean", "waitForConnectorFinished", "(", ")", "throws", "InterruptedException", "{", "connectorStatusLock", ".", "lock", "(", ")", ";", "try", "{", "if", "(", "connectorStatus", "==", "ConnectorStatus", ".", "ConnectorSuccesful", ")", "{", "return", "...
Checks the connector status before a method call is executed. Instantly returns True if the connector already finished successfully , otherwise it will block up to the amount of milliseconds defined by the arbitrationTimeout or until the ProxyInvocationHandler is notified about a successful connection. @return True if...
[ "Checks", "the", "connector", "status", "before", "a", "method", "call", "is", "executed", ".", "Instantly", "returns", "True", "if", "the", "connector", "already", "finished", "successfully", "otherwise", "it", "will", "block", "up", "to", "the", "amount", "o...
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java#L214-L227
58,370
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java
ProxyInvocationHandlerImpl.isConnectorReady
public boolean isConnectorReady() { connectorStatusLock.lock(); try { if (connectorStatus == ConnectorStatus.ConnectorSuccesful) { return true; } return false; } finally { connectorStatusLock.unlock(); } }
java
public boolean isConnectorReady() { connectorStatusLock.lock(); try { if (connectorStatus == ConnectorStatus.ConnectorSuccesful) { return true; } return false; } finally { connectorStatusLock.unlock(); } }
[ "public", "boolean", "isConnectorReady", "(", ")", "{", "connectorStatusLock", ".", "lock", "(", ")", ";", "try", "{", "if", "(", "connectorStatus", "==", "ConnectorStatus", ".", "ConnectorSuccesful", ")", "{", "return", "true", ";", "}", "return", "false", ...
Checks if the connector was set successfully. Returns immediately and does not block until the connector is finished. @return true if a connector was successfully set.
[ "Checks", "if", "the", "connector", "was", "set", "successfully", ".", "Returns", "immediately", "and", "does", "not", "block", "until", "the", "connector", "is", "finished", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java#L235-L247
58,371
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java
ProxyInvocationHandlerImpl.sendQueuedInvocations
private void sendQueuedInvocations() { while (true) { MethodInvocation<?> currentRPC = queuedRpcList.poll(); if (currentRPC == null) { return; } try { connector.executeAsyncMethod(currentRPC.getProxy(), ...
java
private void sendQueuedInvocations() { while (true) { MethodInvocation<?> currentRPC = queuedRpcList.poll(); if (currentRPC == null) { return; } try { connector.executeAsyncMethod(currentRPC.getProxy(), ...
[ "private", "void", "sendQueuedInvocations", "(", ")", "{", "while", "(", "true", ")", "{", "MethodInvocation", "<", "?", ">", "currentRPC", "=", "queuedRpcList", ".", "poll", "(", ")", ";", "if", "(", "currentRPC", "==", "null", ")", "{", "return", ";", ...
Executes previously queued remote calls. This method is called when arbitration is completed.
[ "Executes", "previously", "queued", "remote", "calls", ".", "This", "method", "is", "called", "when", "arbitration", "is", "completed", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java#L288-L308
58,372
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java
ProxyInvocationHandlerImpl.createConnector
@Override public void createConnector(ArbitrationResult result) { connector = connectorFactory.create(proxyParticipantId, result, qosSettings, statelessAsyncParticipantId); connectorStatusLock.lock(); try { connectorStatus = ConnectorStatus.ConnectorSuccesful; connect...
java
@Override public void createConnector(ArbitrationResult result) { connector = connectorFactory.create(proxyParticipantId, result, qosSettings, statelessAsyncParticipantId); connectorStatusLock.lock(); try { connectorStatus = ConnectorStatus.ConnectorSuccesful; connect...
[ "@", "Override", "public", "void", "createConnector", "(", "ArbitrationResult", "result", ")", "{", "connector", "=", "connectorFactory", ".", "create", "(", "proxyParticipantId", ",", "result", ",", "qosSettings", ",", "statelessAsyncParticipantId", ")", ";", "conn...
Sets the connector for this ProxyInvocationHandler after the DiscoveryAgent got notified about a successful arbitration. Should be called from the DiscoveryAgent @param result from the previously invoked arbitration
[ "Sets", "the", "connector", "for", "this", "ProxyInvocationHandler", "after", "the", "DiscoveryAgent", "got", "notified", "about", "a", "successful", "arbitration", ".", "Should", "be", "called", "from", "the", "DiscoveryAgent" ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandlerImpl.java#L331-L348
58,373
bmwcarit/joynr
java/messaging/bounceproxy/single-bounceproxy/src/main/java/io/joynr/bounceproxy/service/TimeService.java
TimeService.getTime
@GET @Produces({ MediaType.TEXT_PLAIN }) public String getTime() { return String.valueOf(System.currentTimeMillis()); }
java
@GET @Produces({ MediaType.TEXT_PLAIN }) public String getTime() { return String.valueOf(System.currentTimeMillis()); }
[ "@", "GET", "@", "Produces", "(", "{", "MediaType", ".", "TEXT_PLAIN", "}", ")", "public", "String", "getTime", "(", ")", "{", "return", "String", ".", "valueOf", "(", "System", ".", "currentTimeMillis", "(", ")", ")", ";", "}" ]
get server time in ms @return the server time in ms
[ "get", "server", "time", "in", "ms" ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy/single-bounceproxy/src/main/java/io/joynr/bounceproxy/service/TimeService.java#L42-L46
58,374
bmwcarit/joynr
java/messaging/servlet-common/src/main/java/io/joynr/servlet/ServletUtil.java
ServletUtil.findFreePort
public static int findFreePort() throws IOException { ServerSocket socket = null; try { socket = new ServerSocket(0); return socket.getLocalPort(); } finally { if (socket != null) { socket.close(); } } }
java
public static int findFreePort() throws IOException { ServerSocket socket = null; try { socket = new ServerSocket(0); return socket.getLocalPort(); } finally { if (socket != null) { socket.close(); } } }
[ "public", "static", "int", "findFreePort", "(", ")", "throws", "IOException", "{", "ServerSocket", "socket", "=", "null", ";", "try", "{", "socket", "=", "new", "ServerSocket", "(", "0", ")", ";", "return", "socket", ".", "getLocalPort", "(", ")", ";", "...
Find a free port on the test system to be used by the servlet engine @return the socket number @throws IOException in case of I/O failure
[ "Find", "a", "free", "port", "on", "the", "test", "system", "to", "be", "used", "by", "the", "servlet", "engine" ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/servlet-common/src/main/java/io/joynr/servlet/ServletUtil.java#L56-L68
58,375
bmwcarit/joynr
java/messaging/bounceproxy-controller-service/src/main/java/io/joynr/messaging/service/MigrationServiceRestAdapter.java
MigrationServiceRestAdapter.migrateCluster
@DELETE @Path("/clusters/{clusterid: ([A-Z,a-z,0-9,_,\\-]+)}") public Response migrateCluster(@PathParam("clusterid") final String clusterId) { // as this is a long running task, this has to be asynchronous migrationService.startClusterMigration(clusterId); return Response.status(202 /...
java
@DELETE @Path("/clusters/{clusterid: ([A-Z,a-z,0-9,_,\\-]+)}") public Response migrateCluster(@PathParam("clusterid") final String clusterId) { // as this is a long running task, this has to be asynchronous migrationService.startClusterMigration(clusterId); return Response.status(202 /...
[ "@", "DELETE", "@", "Path", "(", "\"/clusters/{clusterid: ([A-Z,a-z,0-9,_,\\\\-]+)}\"", ")", "public", "Response", "migrateCluster", "(", "@", "PathParam", "(", "\"clusterid\"", ")", "final", "String", "clusterId", ")", "{", "// as this is a long running task, this has to b...
Migrates all bounce proxies of one cluster to a different cluster. @param clusterId the identifier of the cluster to migrate @return response with status 202 (accepted)
[ "Migrates", "all", "bounce", "proxies", "of", "one", "cluster", "to", "a", "different", "cluster", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy-controller-service/src/main/java/io/joynr/messaging/service/MigrationServiceRestAdapter.java#L47-L55
58,376
bmwcarit/joynr
java/messaging/bounceproxy/controlled-bounceproxy/src/main/java/io/joynr/messaging/bounceproxy/BounceProxyControllerUrl.java
BounceProxyControllerUrl.buildReportStartupUrl
public String buildReportStartupUrl(ControlledBounceProxyUrl controlledBounceProxyUrl) throws UnsupportedEncodingException { String url4cc = URLEncoder.encode(controlledBounceProxyUrl.getOwnUrlForClusterControllers(), "UTF-8"); String url4bpc = URLEncoder.encode(controlledBounceProxyUrl.getOwnUrlForBoun...
java
public String buildReportStartupUrl(ControlledBounceProxyUrl controlledBounceProxyUrl) throws UnsupportedEncodingException { String url4cc = URLEncoder.encode(controlledBounceProxyUrl.getOwnUrlForClusterControllers(), "UTF-8"); String url4bpc = URLEncoder.encode(controlledBounceProxyUrl.getOwnUrlForBoun...
[ "public", "String", "buildReportStartupUrl", "(", "ControlledBounceProxyUrl", "controlledBounceProxyUrl", ")", "throws", "UnsupportedEncodingException", "{", "String", "url4cc", "=", "URLEncoder", ".", "encode", "(", "controlledBounceProxyUrl", ".", "getOwnUrlForClusterControll...
Returns the URL including query parameters to report bounce proxy startup. @param controlledBounceProxyUrl the URL of the bounce proxy @return the url including encoded query parameters @throws UnsupportedEncodingException if urls passed as query parameters could not be encoded correctly.
[ "Returns", "the", "URL", "including", "query", "parameters", "to", "report", "bounce", "proxy", "startup", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy/controlled-bounceproxy/src/main/java/io/joynr/messaging/bounceproxy/BounceProxyControllerUrl.java#L74-L82
58,377
bmwcarit/joynr
java/messaging/bounceproxy/single-bounceproxy/src/main/java/io/joynr/bounceproxy/service/MessagingWithoutContentTypeService.java
MessagingWithoutContentTypeService.postMessageWithoutContentType
@POST @Consumes({ MediaType.APPLICATION_OCTET_STREAM }) public Response postMessageWithoutContentType(@PathParam("ccid") String ccid, byte[] serializedMessage) throws IOException { ImmutableMessage message; try { message = new Immuta...
java
@POST @Consumes({ MediaType.APPLICATION_OCTET_STREAM }) public Response postMessageWithoutContentType(@PathParam("ccid") String ccid, byte[] serializedMessage) throws IOException { ImmutableMessage message; try { message = new Immuta...
[ "@", "POST", "@", "Consumes", "(", "{", "MediaType", ".", "APPLICATION_OCTET_STREAM", "}", ")", "public", "Response", "postMessageWithoutContentType", "(", "@", "PathParam", "(", "\"ccid\"", ")", "String", "ccid", ",", "byte", "[", "]", "serializedMessage", ")",...
Send a message to the given cluster controller like the above method postMessage @param ccid the channel id @param serializedMessage a serialized SMRF message to be sent @return response builder object with the URL that can be queried to get the message @throws IOException on I/O error @throws JsonParseException on par...
[ "Send", "a", "message", "to", "the", "given", "cluster", "controller", "like", "the", "above", "method", "postMessage" ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy/single-bounceproxy/src/main/java/io/joynr/bounceproxy/service/MessagingWithoutContentTypeService.java#L85-L121
58,378
bmwcarit/joynr
java/javaapi/src/main/java/io/joynr/pubsub/SubscriptionQos.java
SubscriptionQos.setValidityMs
public SubscriptionQos setValidityMs(final long validityMs) { if (validityMs == -1) { setExpiryDateMs(NO_EXPIRY_DATE); } else { long now = System.currentTimeMillis(); this.expiryDateMs = now + validityMs; } return this; }
java
public SubscriptionQos setValidityMs(final long validityMs) { if (validityMs == -1) { setExpiryDateMs(NO_EXPIRY_DATE); } else { long now = System.currentTimeMillis(); this.expiryDateMs = now + validityMs; } return this; }
[ "public", "SubscriptionQos", "setValidityMs", "(", "final", "long", "validityMs", ")", "{", "if", "(", "validityMs", "==", "-", "1", ")", "{", "setExpiryDateMs", "(", "NO_EXPIRY_DATE", ")", ";", "}", "else", "{", "long", "now", "=", "System", ".", "current...
Set how long the subscription should run for, in milliseconds. This is a helper method that allows setting the expiryDate using a relative time. @param validityMs is the number of milliseconds until the subscription will expire @return the subscriptionQos (fluent interface)
[ "Set", "how", "long", "the", "subscription", "should", "run", "for", "in", "milliseconds", ".", "This", "is", "a", "helper", "method", "that", "allows", "setting", "the", "expiryDate", "using", "a", "relative", "time", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/javaapi/src/main/java/io/joynr/pubsub/SubscriptionQos.java#L94-L102
58,379
bmwcarit/joynr
java/messaging/bounceproxy/bounceproxy-common/src/main/java/io/joynr/messaging/bounceproxy/LongPollingMessagingDelegate.java
LongPollingMessagingDelegate.listChannels
public List<ChannelInformation> listChannels() { LinkedList<ChannelInformation> entries = new LinkedList<ChannelInformation>(); Collection<Broadcaster> broadcasters = BroadcasterFactory.getDefault().lookupAll(); String name; for (Broadcaster broadcaster : broadcasters) { if (...
java
public List<ChannelInformation> listChannels() { LinkedList<ChannelInformation> entries = new LinkedList<ChannelInformation>(); Collection<Broadcaster> broadcasters = BroadcasterFactory.getDefault().lookupAll(); String name; for (Broadcaster broadcaster : broadcasters) { if (...
[ "public", "List", "<", "ChannelInformation", ">", "listChannels", "(", ")", "{", "LinkedList", "<", "ChannelInformation", ">", "entries", "=", "new", "LinkedList", "<", "ChannelInformation", ">", "(", ")", ";", "Collection", "<", "Broadcaster", ">", "broadcaster...
Gets a list of all channel information. @return list of all channel informations
[ "Gets", "a", "list", "of", "all", "channel", "information", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy/bounceproxy-common/src/main/java/io/joynr/messaging/bounceproxy/LongPollingMessagingDelegate.java#L66-L82
58,380
bmwcarit/joynr
java/messaging/bounceproxy/bounceproxy-common/src/main/java/io/joynr/messaging/bounceproxy/LongPollingMessagingDelegate.java
LongPollingMessagingDelegate.createChannel
public String createChannel(String ccid, String atmosphereTrackingId) { throwExceptionIfTrackingIdnotSet(atmosphereTrackingId); log.info("CREATE channel for cluster controller: {} trackingId: {} ", ccid, atmosphereTrackingId); Broadcaster broadcaster = null; // look for an existing bro...
java
public String createChannel(String ccid, String atmosphereTrackingId) { throwExceptionIfTrackingIdnotSet(atmosphereTrackingId); log.info("CREATE channel for cluster controller: {} trackingId: {} ", ccid, atmosphereTrackingId); Broadcaster broadcaster = null; // look for an existing bro...
[ "public", "String", "createChannel", "(", "String", "ccid", ",", "String", "atmosphereTrackingId", ")", "{", "throwExceptionIfTrackingIdnotSet", "(", "atmosphereTrackingId", ")", ";", "log", ".", "info", "(", "\"CREATE channel for cluster controller: {} trackingId: {} \"", ...
Creates a long polling channel. @param ccid the identifier of the channel @param atmosphereTrackingId the tracking ID of the channel @return the path segment for the channel. The path, appended to the base URI of the channel service, can be used to post messages to the channel.
[ "Creates", "a", "long", "polling", "channel", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy/bounceproxy-common/src/main/java/io/joynr/messaging/bounceproxy/LongPollingMessagingDelegate.java#L95-L133
58,381
bmwcarit/joynr
java/messaging/bounceproxy/bounceproxy-common/src/main/java/io/joynr/messaging/bounceproxy/LongPollingMessagingDelegate.java
LongPollingMessagingDelegate.deleteChannel
public boolean deleteChannel(String ccid) { log.info("DELETE channel for cluster controller: " + ccid); Broadcaster broadcaster = BroadcasterFactory.getDefault().lookup(Broadcaster.class, ccid, false); if (broadcaster == null) { return false; } BroadcasterFactory.get...
java
public boolean deleteChannel(String ccid) { log.info("DELETE channel for cluster controller: " + ccid); Broadcaster broadcaster = BroadcasterFactory.getDefault().lookup(Broadcaster.class, ccid, false); if (broadcaster == null) { return false; } BroadcasterFactory.get...
[ "public", "boolean", "deleteChannel", "(", "String", "ccid", ")", "{", "log", ".", "info", "(", "\"DELETE channel for cluster controller: \"", "+", "ccid", ")", ";", "Broadcaster", "broadcaster", "=", "BroadcasterFactory", ".", "getDefault", "(", ")", ".", "lookup...
Deletes a channel from the broadcaster. @param ccid the channel to delete @return <code>true</code> if the channel existed and could be deleted, <code>false</code> if there was no channel for the given ID and therefore could not be deleted.
[ "Deletes", "a", "channel", "from", "the", "broadcaster", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy/bounceproxy-common/src/main/java/io/joynr/messaging/bounceproxy/LongPollingMessagingDelegate.java#L144-L157
58,382
bmwcarit/joynr
java/messaging/bounceproxy/bounceproxy-common/src/main/java/io/joynr/messaging/bounceproxy/LongPollingMessagingDelegate.java
LongPollingMessagingDelegate.postMessage
public String postMessage(String ccid, byte[] serializedMessage) { ImmutableMessage message; try { message = new ImmutableMessage(serializedMessage); } catch (EncodingException | UnsuppportedVersionException e) { throw new JoynrHttpException(Status.BAD_REQUEST, JOYNRMESS...
java
public String postMessage(String ccid, byte[] serializedMessage) { ImmutableMessage message; try { message = new ImmutableMessage(serializedMessage); } catch (EncodingException | UnsuppportedVersionException e) { throw new JoynrHttpException(Status.BAD_REQUEST, JOYNRMESS...
[ "public", "String", "postMessage", "(", "String", "ccid", ",", "byte", "[", "]", "serializedMessage", ")", "{", "ImmutableMessage", "message", ";", "try", "{", "message", "=", "new", "ImmutableMessage", "(", "serializedMessage", ")", ";", "}", "catch", "(", ...
Posts a message to a long polling channel. @param ccid the identifier of the long polling channel @param serializedMessage the message to send serialized as a SMRF message @return the path segment for the message status. The path, appended to the base URI of the messaging service, can be used to query the message stat...
[ "Posts", "a", "message", "to", "a", "long", "polling", "channel", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy/bounceproxy-common/src/main/java/io/joynr/messaging/bounceproxy/LongPollingMessagingDelegate.java#L212-L264
58,383
bmwcarit/joynr
java/core/clustercontroller/src/main/java/io/joynr/capabilities/LocalCapabilitiesDirectoryImpl.java
LocalCapabilitiesDirectoryImpl.asyncGetGlobalCapabilitities
private void asyncGetGlobalCapabilitities(final String[] domains, final String interfaceName, Collection<DiscoveryEntryWithMetaInfo> localDiscoveryEntries2, long discoveryTimeout, ...
java
private void asyncGetGlobalCapabilitities(final String[] domains, final String interfaceName, Collection<DiscoveryEntryWithMetaInfo> localDiscoveryEntries2, long discoveryTimeout, ...
[ "private", "void", "asyncGetGlobalCapabilitities", "(", "final", "String", "[", "]", "domains", ",", "final", "String", "interfaceName", ",", "Collection", "<", "DiscoveryEntryWithMetaInfo", ">", "localDiscoveryEntries2", ",", "long", "discoveryTimeout", ",", "final", ...
mixes in the localDiscoveryEntries to global capabilities found by participantId
[ "mixes", "in", "the", "localDiscoveryEntries", "to", "global", "capabilities", "found", "by", "participantId" ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/clustercontroller/src/main/java/io/joynr/capabilities/LocalCapabilitiesDirectoryImpl.java#L610-L643
58,384
bmwcarit/joynr
java/messaging/messaging-common/src/main/java/io/joynr/messaging/util/Utilities.java
Utilities.isSessionEncodedInUrl
public static boolean isSessionEncodedInUrl(String encodedUrl, String sessionIdName) { int sessionIdIndex = encodedUrl.indexOf(getSessionIdSubstring(sessionIdName)); return sessionIdIndex >= 0; }
java
public static boolean isSessionEncodedInUrl(String encodedUrl, String sessionIdName) { int sessionIdIndex = encodedUrl.indexOf(getSessionIdSubstring(sessionIdName)); return sessionIdIndex >= 0; }
[ "public", "static", "boolean", "isSessionEncodedInUrl", "(", "String", "encodedUrl", ",", "String", "sessionIdName", ")", "{", "int", "sessionIdIndex", "=", "encodedUrl", ".", "indexOf", "(", "getSessionIdSubstring", "(", "sessionIdName", ")", ")", ";", "return", ...
Returns whether the session ID is encoded into the URL. @param encodedUrl the url to check @param sessionIdName the name of the session ID, e.g. jsessionid @return boolean value, true if session ID is encoded into the URL.
[ "Returns", "whether", "the", "session", "ID", "is", "encoded", "into", "the", "URL", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/messaging-common/src/main/java/io/joynr/messaging/util/Utilities.java#L123-L126
58,385
bmwcarit/joynr
java/messaging/messaging-common/src/main/java/io/joynr/messaging/util/Utilities.java
Utilities.getUrlWithoutSessionId
public static String getUrlWithoutSessionId(String url, String sessionIdName) { if (isSessionEncodedInUrl(url, sessionIdName)) { return url.substring(0, url.indexOf(getSessionIdSubstring(sessionIdName))); } return url; }
java
public static String getUrlWithoutSessionId(String url, String sessionIdName) { if (isSessionEncodedInUrl(url, sessionIdName)) { return url.substring(0, url.indexOf(getSessionIdSubstring(sessionIdName))); } return url; }
[ "public", "static", "String", "getUrlWithoutSessionId", "(", "String", "url", ",", "String", "sessionIdName", ")", "{", "if", "(", "isSessionEncodedInUrl", "(", "url", ",", "sessionIdName", ")", ")", "{", "return", "url", ".", "substring", "(", "0", ",", "ur...
Returns the URL without the session encoded into the URL. @param url the url to de-code @param sessionIdName the name of the session ID, e.g. jsessionid @return url without session id information or url, if no session was encoded into the URL
[ "Returns", "the", "URL", "without", "the", "session", "encoded", "into", "the", "URL", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/messaging-common/src/main/java/io/joynr/messaging/util/Utilities.java#L138-L144
58,386
bmwcarit/joynr
java/messaging/messaging-common/src/main/java/io/joynr/messaging/util/Utilities.java
Utilities.getSessionEncodedUrl
public static String getSessionEncodedUrl(String url, String sessionIdName, String sessionId) { return url + getSessionIdSubstring(sessionIdName) + sessionId; }
java
public static String getSessionEncodedUrl(String url, String sessionIdName, String sessionId) { return url + getSessionIdSubstring(sessionIdName) + sessionId; }
[ "public", "static", "String", "getSessionEncodedUrl", "(", "String", "url", ",", "String", "sessionIdName", ",", "String", "sessionId", ")", "{", "return", "url", "+", "getSessionIdSubstring", "(", "sessionIdName", ")", "+", "sessionId", ";", "}" ]
Returns a url with the session encoded into the URL @param url the URL to encode @param sessionIdName the name of the session ID, e.g. jsessionid @param sessionId the session ID @return URL with the session encoded into the URL
[ "Returns", "a", "url", "with", "the", "session", "encoded", "into", "the", "URL" ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/messaging-common/src/main/java/io/joynr/messaging/util/Utilities.java#L181-L183
58,387
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/dispatching/subscription/PublicationManagerImpl.java
PublicationManagerImpl.stopPublicationByProviderId
private void stopPublicationByProviderId(String providerParticipantId) { for (PublicationInformation publicationInformation : subscriptionId2PublicationInformation.values()) { if (publicationInformation.getProviderParticipantId().equals(providerParticipantId)) { removePublication(pub...
java
private void stopPublicationByProviderId(String providerParticipantId) { for (PublicationInformation publicationInformation : subscriptionId2PublicationInformation.values()) { if (publicationInformation.getProviderParticipantId().equals(providerParticipantId)) { removePublication(pub...
[ "private", "void", "stopPublicationByProviderId", "(", "String", "providerParticipantId", ")", "{", "for", "(", "PublicationInformation", "publicationInformation", ":", "subscriptionId2PublicationInformation", ".", "values", "(", ")", ")", "{", "if", "(", "publicationInfo...
Stops all publications for a provider @param providerParticipantId provider for which all publication should be stopped
[ "Stops", "all", "publications", "for", "a", "provider" ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/dispatching/subscription/PublicationManagerImpl.java#L576-L586
58,388
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/dispatching/subscription/PublicationManagerImpl.java
PublicationManagerImpl.restoreQueuedSubscription
private void restoreQueuedSubscription(String providerId, ProviderContainer providerContainer) { Collection<PublicationInformation> queuedRequests = queuedSubscriptionRequests.get(providerId); Iterator<PublicationInformation> queuedRequestsIterator = queuedRequests.iterator(); while (queuedReque...
java
private void restoreQueuedSubscription(String providerId, ProviderContainer providerContainer) { Collection<PublicationInformation> queuedRequests = queuedSubscriptionRequests.get(providerId); Iterator<PublicationInformation> queuedRequestsIterator = queuedRequests.iterator(); while (queuedReque...
[ "private", "void", "restoreQueuedSubscription", "(", "String", "providerId", ",", "ProviderContainer", "providerContainer", ")", "{", "Collection", "<", "PublicationInformation", ">", "queuedRequests", "=", "queuedSubscriptionRequests", ".", "get", "(", "providerId", ")",...
Called every time a provider is registered to check whether there are already subscriptionRequests waiting. @param providerId provider id @param providerContainer provider container
[ "Called", "every", "time", "a", "provider", "is", "registered", "to", "check", "whether", "there", "are", "already", "subscriptionRequests", "waiting", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/dispatching/subscription/PublicationManagerImpl.java#L602-L615
58,389
bmwcarit/joynr
java/messaging/bounceproxy/bounceproxy-controller/src/main/java/io/joynr/messaging/bounceproxy/controller/util/ChannelUrlUtil.java
ChannelUrlUtil.createChannelLocation
public static URI createChannelLocation(ControlledBounceProxyInformation bpInfo, String ccid, URI location) { return URI.create(location.toString() + ";jsessionid=." + bpInfo.getInstanceId()); }
java
public static URI createChannelLocation(ControlledBounceProxyInformation bpInfo, String ccid, URI location) { return URI.create(location.toString() + ";jsessionid=." + bpInfo.getInstanceId()); }
[ "public", "static", "URI", "createChannelLocation", "(", "ControlledBounceProxyInformation", "bpInfo", ",", "String", "ccid", ",", "URI", "location", ")", "{", "return", "URI", ".", "create", "(", "location", ".", "toString", "(", ")", "+", "\";jsessionid=.\"", ...
Creates the channel location that is returned to the cluster controller. This includes tweaking of the URL for example to contain a session ID. @param bpInfo information of the bounce proxy @param ccid channel identifier @param location the channel URL as returned by the bounce proxy instance that created the channel ...
[ "Creates", "the", "channel", "location", "that", "is", "returned", "to", "the", "cluster", "controller", ".", "This", "includes", "tweaking", "of", "the", "URL", "for", "example", "to", "contain", "a", "session", "ID", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy/bounceproxy-controller/src/main/java/io/joynr/messaging/bounceproxy/controller/util/ChannelUrlUtil.java#L48-L51
58,390
bmwcarit/joynr
java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java
ChannelServiceRestAdapter.listChannels
@GET @Produces("application/json") public GenericEntity<List<ChannelInformation>> listChannels() { try { return new GenericEntity<List<ChannelInformation>>(channelService.listChannels()) { }; } catch (Exception e) { log.error("GET channels listChannels: error:...
java
@GET @Produces("application/json") public GenericEntity<List<ChannelInformation>> listChannels() { try { return new GenericEntity<List<ChannelInformation>>(channelService.listChannels()) { }; } catch (Exception e) { log.error("GET channels listChannels: error:...
[ "@", "GET", "@", "Produces", "(", "\"application/json\"", ")", "public", "GenericEntity", "<", "List", "<", "ChannelInformation", ">", ">", "listChannels", "(", ")", "{", "try", "{", "return", "new", "GenericEntity", "<", "List", "<", "ChannelInformation", ">"...
A simple HTML list view of channels. A JSP is used for rendering. @return a HTML list of available channels, and their resources (long poll connections) if connected.
[ "A", "simple", "HTML", "list", "view", "of", "channels", ".", "A", "JSP", "is", "used", "for", "rendering", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java#L81-L91
58,391
bmwcarit/joynr
java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java
ChannelServiceRestAdapter.open
@GET @Path("/{ccid: [A-Z,a-z,0-9,_,\\-,\\.]+}") @Produces({ MediaType.APPLICATION_JSON }) @Suspend(resumeOnBroadcast = true, period = ChannelServiceConstants.EXPIRE_TIME_CONNECTION, timeUnit = TimeUnit.SECONDS, contentType = MediaType.APPLICATION_JSON) public Broadcastable open(@PathParam("...
java
@GET @Path("/{ccid: [A-Z,a-z,0-9,_,\\-,\\.]+}") @Produces({ MediaType.APPLICATION_JSON }) @Suspend(resumeOnBroadcast = true, period = ChannelServiceConstants.EXPIRE_TIME_CONNECTION, timeUnit = TimeUnit.SECONDS, contentType = MediaType.APPLICATION_JSON) public Broadcastable open(@PathParam("...
[ "@", "GET", "@", "Path", "(", "\"/{ccid: [A-Z,a-z,0-9,_,\\\\-,\\\\.]+}\"", ")", "@", "Produces", "(", "{", "MediaType", ".", "APPLICATION_JSON", "}", ")", "@", "Suspend", "(", "resumeOnBroadcast", "=", "true", ",", "period", "=", "ChannelServiceConstants", ".", ...
Open a long poll channel for the given cluster controller. The channel is closed automatically by the server at regular intervals to ensure liveliness. @param ccid cluster controller id @param cacheIndex cache index @param atmosphereTrackingId the tracking for atmosphere @return new message(s), or nothing if the chann...
[ "Open", "a", "long", "poll", "channel", "for", "the", "given", "cluster", "controller", ".", "The", "channel", "is", "closed", "automatically", "by", "the", "server", "at", "regular", "intervals", "to", "ensure", "liveliness", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java#L103-L120
58,392
bmwcarit/joynr
java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java
ChannelServiceRestAdapter.createChannel
@POST @Produces({ MediaType.TEXT_PLAIN }) public Response createChannel(@QueryParam("ccid") String ccid, @HeaderParam(ChannelServiceConstants.X_ATMOSPHERE_TRACKING_ID) String atmosphereTrackingId) { try { log.info("CREATE channel for channel ID: {}", ccid);...
java
@POST @Produces({ MediaType.TEXT_PLAIN }) public Response createChannel(@QueryParam("ccid") String ccid, @HeaderParam(ChannelServiceConstants.X_ATMOSPHERE_TRACKING_ID) String atmosphereTrackingId) { try { log.info("CREATE channel for channel ID: {}", ccid);...
[ "@", "POST", "@", "Produces", "(", "{", "MediaType", ".", "TEXT_PLAIN", "}", ")", "public", "Response", "createChannel", "(", "@", "QueryParam", "(", "\"ccid\"", ")", "String", "ccid", ",", "@", "HeaderParam", "(", "ChannelServiceConstants", ".", "X_ATMOSPHERE...
HTTP POST to create a channel, returns location to new resource which can then be long polled. Since the channel id may later change to be a UUID, not using a PUT but rather POST with used id being returned @param ccid cluster controller id @param atmosphereTrackingId tracking id for atmosphere @return location to new ...
[ "HTTP", "POST", "to", "create", "a", "channel", "returns", "location", "to", "new", "resource", "which", "can", "then", "be", "long", "polled", ".", "Since", "the", "channel", "id", "may", "later", "change", "to", "be", "a", "UUID", "not", "using", "a", ...
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java#L130-L168
58,393
bmwcarit/joynr
java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java
ChannelServiceRestAdapter.deleteChannel
@DELETE @Path("/{ccid: [A-Z,a-z,0-9,_,\\-,\\.]+}") public Response deleteChannel(@PathParam("ccid") String ccid) { try { log.info("DELETE channel for cluster controller: {}", ccid); if (channelService.deleteChannel(ccid)) { return Response.ok().build(); ...
java
@DELETE @Path("/{ccid: [A-Z,a-z,0-9,_,\\-,\\.]+}") public Response deleteChannel(@PathParam("ccid") String ccid) { try { log.info("DELETE channel for cluster controller: {}", ccid); if (channelService.deleteChannel(ccid)) { return Response.ok().build(); ...
[ "@", "DELETE", "@", "Path", "(", "\"/{ccid: [A-Z,a-z,0-9,_,\\\\-,\\\\.]+}\"", ")", "public", "Response", "deleteChannel", "(", "@", "PathParam", "(", "\"ccid\"", ")", "String", "ccid", ")", "{", "try", "{", "log", ".", "info", "(", "\"DELETE channel for cluster co...
Remove the channel for the given cluster controller. @param ccid the ID of the channel @return response ok if deletion was successful, else empty response
[ "Remove", "the", "channel", "for", "the", "given", "cluster", "controller", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java#L176-L193
58,394
bmwcarit/joynr
java/core/clustercontroller/src/main/java/io/joynr/messaging/http/operation/LongPollingChannelLifecycle.java
LongPollingChannelLifecycle.createChannel
private synchronized boolean createChannel() { final String url = settings.getBounceProxyUrl().buildCreateChannelUrl(channelId); HttpPost postCreateChannel = httpRequestFactory.createHttpPost(URI.create(url.trim())); postCreateChannel.setConfig(defaultRequestConfig); postCreateChannel....
java
private synchronized boolean createChannel() { final String url = settings.getBounceProxyUrl().buildCreateChannelUrl(channelId); HttpPost postCreateChannel = httpRequestFactory.createHttpPost(URI.create(url.trim())); postCreateChannel.setConfig(defaultRequestConfig); postCreateChannel....
[ "private", "synchronized", "boolean", "createChannel", "(", ")", "{", "final", "String", "url", "=", "settings", ".", "getBounceProxyUrl", "(", ")", ".", "buildCreateChannelUrl", "(", "channelId", ")", ";", "HttpPost", "postCreateChannel", "=", "httpRequestFactory",...
Create a new channel for the given cluster controller id. If a channel already exists, it is returned instead. @return whether channel was created
[ "Create", "a", "new", "channel", "for", "the", "given", "cluster", "controller", "id", ".", "If", "a", "channel", "already", "exists", "it", "is", "returned", "instead", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/clustercontroller/src/main/java/io/joynr/messaging/http/operation/LongPollingChannelLifecycle.java#L337-L393
58,395
bmwcarit/joynr
java/javaapi/src/main/java/io/joynr/dispatcher/rpc/ReflectionUtils.java
ReflectionUtils.findAndMergeParameterAnnotations
public static List<List<Annotation>> findAndMergeParameterAnnotations(Method method) { List<List<Annotation>> res = new ArrayList<List<Annotation>>(method.getParameterTypes().length); for (int i = 0; i < method.getParameterTypes().length; i++) { res.add(new LinkedList<Annotation>()); ...
java
public static List<List<Annotation>> findAndMergeParameterAnnotations(Method method) { List<List<Annotation>> res = new ArrayList<List<Annotation>>(method.getParameterTypes().length); for (int i = 0; i < method.getParameterTypes().length; i++) { res.add(new LinkedList<Annotation>()); ...
[ "public", "static", "List", "<", "List", "<", "Annotation", ">", ">", "findAndMergeParameterAnnotations", "(", "Method", "method", ")", "{", "List", "<", "List", "<", "Annotation", ">>", "res", "=", "new", "ArrayList", "<", "List", "<", "Annotation", ">", ...
Utility function to find all annotations on the parameters of the specified method and merge them with the same annotations on all base classes and interfaces. @param method the method in question @return the list of annotations for this method
[ "Utility", "function", "to", "find", "all", "annotations", "on", "the", "parameters", "of", "the", "specified", "method", "and", "merge", "them", "with", "the", "same", "annotations", "on", "all", "base", "classes", "and", "interfaces", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/javaapi/src/main/java/io/joynr/dispatcher/rpc/ReflectionUtils.java#L141-L148
58,396
bmwcarit/joynr
java/javaapi/src/main/java/io/joynr/dispatcher/rpc/ReflectionUtils.java
ReflectionUtils.areMethodNameAndParameterTypesEqual
private static boolean areMethodNameAndParameterTypesEqual(Method methodA, Method methodB) { if (!methodA.getName().equals(methodB.getName())) { return false; } Class<?>[] methodAParameterTypes = methodA.getParameterTypes(); Class<?>[] methodBParameterTypes = methodB.getParam...
java
private static boolean areMethodNameAndParameterTypesEqual(Method methodA, Method methodB) { if (!methodA.getName().equals(methodB.getName())) { return false; } Class<?>[] methodAParameterTypes = methodA.getParameterTypes(); Class<?>[] methodBParameterTypes = methodB.getParam...
[ "private", "static", "boolean", "areMethodNameAndParameterTypesEqual", "(", "Method", "methodA", ",", "Method", "methodB", ")", "{", "if", "(", "!", "methodA", ".", "getName", "(", ")", ".", "equals", "(", "methodB", ".", "getName", "(", ")", ")", ")", "{"...
Compares to methods for equality based on name and parameter types.
[ "Compares", "to", "methods", "for", "equality", "based", "on", "name", "and", "parameter", "types", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/javaapi/src/main/java/io/joynr/dispatcher/rpc/ReflectionUtils.java#L174-L190
58,397
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/arbitration/Arbitrator.java
Arbitrator.arbitrationFinished
protected void arbitrationFinished(ArbitrationStatus arbitrationStatus, ArbitrationResult arbitrationResult) { this.arbitrationStatus = arbitrationStatus; this.arbitrationResult = arbitrationResult; // wait for arbitration listener to be registered if (arbitrationListenerSemaphore.tryAc...
java
protected void arbitrationFinished(ArbitrationStatus arbitrationStatus, ArbitrationResult arbitrationResult) { this.arbitrationStatus = arbitrationStatus; this.arbitrationResult = arbitrationResult; // wait for arbitration listener to be registered if (arbitrationListenerSemaphore.tryAc...
[ "protected", "void", "arbitrationFinished", "(", "ArbitrationStatus", "arbitrationStatus", ",", "ArbitrationResult", "arbitrationResult", ")", "{", "this", ".", "arbitrationStatus", "=", "arbitrationStatus", ";", "this", ".", "arbitrationResult", "=", "arbitrationResult", ...
Sets the arbitration result at the arbitrationListener if the listener is already registered
[ "Sets", "the", "arbitration", "result", "at", "the", "arbitrationListener", "if", "the", "listener", "is", "already", "registered" ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/arbitration/Arbitrator.java#L153-L162
58,398
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/runtime/JoynrRuntimeImpl.java
JoynrRuntimeImpl.registerProvider
@Override public Future<Void> registerProvider(String domain, Object provider, ProviderQos providerQos, boolean awaitGlobalRegistration, final Class<?> ...
java
@Override public Future<Void> registerProvider(String domain, Object provider, ProviderQos providerQos, boolean awaitGlobalRegistration, final Class<?> ...
[ "@", "Override", "public", "Future", "<", "Void", ">", "registerProvider", "(", "String", "domain", ",", "Object", "provider", ",", "ProviderQos", "providerQos", ",", "boolean", "awaitGlobalRegistration", ",", "final", "Class", "<", "?", ">", "interfaceClass", "...
Registers a provider in the joynr framework by JEE @param domain The domain the provider should be registered for. Has to be identical at the client to be able to find the provider. @param provider Instance of the provider implementation (has to extend a generated ...AbstractProvider). @param providerQos the provider'...
[ "Registers", "a", "provider", "in", "the", "joynr", "framework", "by", "JEE" ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/runtime/JoynrRuntimeImpl.java#L211-L223
58,399
bmwcarit/joynr
java/messaging/bounceproxy/bounceproxy-controller-persistence/persistence-common/src/main/java/io/joynr/messaging/bounceproxy/controller/directory/BounceProxyRecord.java
BounceProxyRecord.setStatus
public void setStatus(BounceProxyStatus status) throws IllegalStateException { // this checks if the transition is valid if (this.status.isValidTransition(status)) { this.status = status; } else { throw new IllegalStateException("Illegal status transition from " + this.st...
java
public void setStatus(BounceProxyStatus status) throws IllegalStateException { // this checks if the transition is valid if (this.status.isValidTransition(status)) { this.status = status; } else { throw new IllegalStateException("Illegal status transition from " + this.st...
[ "public", "void", "setStatus", "(", "BounceProxyStatus", "status", ")", "throws", "IllegalStateException", "{", "// this checks if the transition is valid", "if", "(", "this", ".", "status", ".", "isValidTransition", "(", "status", ")", ")", "{", "this", ".", "statu...
Sets the status of the bounce proxy. @param status the status of the bounce proxy @throws IllegalStateException if setting this status is not possible for the current bounce proxy status.
[ "Sets", "the", "status", "of", "the", "bounce", "proxy", "." ]
b7a92bad1cf2f093de080facd2c803560f4c6c26
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/bounceproxy/bounceproxy-controller-persistence/persistence-common/src/main/java/io/joynr/messaging/bounceproxy/controller/directory/BounceProxyRecord.java#L93-L100