idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
16,700
public void renameTo ( String relPath , Result < Boolean > result , WriteOption ... options ) { _root . renameTo ( _path , toAbsolute ( relPath ) , result , options ) ; }
Renames to a destination file
16,701
public void get ( byte [ ] tableKey , byte [ ] key , long version , Result < GetStreamResult > result ) { _tableManager . getKelpBacking ( ) . getLocal ( tableKey , key , version , result . then ( gs -> getImpl ( gs ) ) ) ; }
Get a row from a table .
16,702
public void put ( byte [ ] tableKey , StreamSource rowSource , Result < Boolean > result ) { putImpl ( tableKey , rowSource , PutType . PUT , result ) ; }
Puts the row for replication .
16,703
public void remove ( byte [ ] tableKey , byte [ ] rowKey , long version , Result < Boolean > result ) { _tableManager . getKelpBacking ( ) . remove ( tableKey , rowKey , version , result ) ; }
Removes a row identified by its key . If the current value has a later version than the request the request is ignored .
16,704
public void find ( byte [ ] tableKey , Object arg , Result < byte [ ] > result ) { TableKraken table = _tableManager . getTable ( tableKey ) ; if ( table == null ) { throw new QueryException ( L . l ( "'{0}' is an unknown table." , Hex . toShortHex ( tableKey ) ) ) ; } String sql = "select_local table_key from kraken_meta_table where table_name=?" ; QueryBuilderKraken builder = QueryParserKraken . parse ( _tableManager , sql ) ; QueryKraken query = builder . build ( ) ; query . findOne ( result . then ( cursor -> findKeyResult ( cursor ) ) , arg ) ; }
Find a table by its name .
16,705
public void requestStartupUpdates ( String from , byte [ ] tableKey , int podIndex , long deltaTime , Result < Boolean > cont ) { if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "CacheRequestUpdates " + from + " shard=" + podIndex + " delta=" + deltaTime ) ; } long accessTime = CurrentTime . currentTime ( ) + deltaTime ; TablePod tablePod = _clientKraken . getTable ( tableKey ) ; if ( tablePod == null ) { if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( L . l ( "{0} is an unknown table key ({1})" , Hex . toShortHex ( tableKey ) , BartenderSystem . getCurrentSelfServer ( ) ) ) ; } cont . ok ( true ) ; return ; } tablePod . getUpdatesFromLocal ( podIndex , accessTime , cont ) ; }
Asks for updates from the message
16,706
public PathImpl fsWalk ( String userPath , Map < String , Object > attributes , String path ) { return new ClasspathPath ( _root , userPath , path ) ; }
Lookup the actual path relative to the filesystem root .
16,707
public boolean exists ( ) { ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; return loader . getResource ( getTrimPath ( ) ) != null ; }
Returns true if the file exists .
16,708
public char setIndex ( int pos ) { if ( pos < 0 ) { _pos = 0 ; return DONE ; } else if ( _length <= pos ) { _pos = _length ; return DONE ; } else { _pos = pos ; return _string . charAt ( pos ) ; } }
sets the cursor to the position
16,709
public char skip ( int n ) { _pos += n ; if ( _length <= _pos ) { _pos = _string . length ( ) ; return DONE ; } else return _string . charAt ( _pos ) ; }
Skips the next n characters
16,710
public RowBuilder int16 ( String name ) { ColumnInt16 column = new ColumnInt16 ( _columns . size ( ) , name , _offset ) ; _offset += column . length ( ) ; _columns . add ( column ) ; return this ; }
Creates a 16 - bit integer valued column
16,711
public RowBuilder int32 ( String name ) { ColumnInt32 column = new ColumnInt32 ( _columns . size ( ) , name , _offset ) ; _offset += column . length ( ) ; _columns . add ( column ) ; return this ; }
Creates a 32 - bit integer valued column
16,712
public RowBuilder int64 ( String name ) { ColumnInt64 column = new ColumnInt64 ( _columns . size ( ) , name , _offset ) ; _offset += column . length ( ) ; _columns . add ( column ) ; return this ; }
Creates a 64 - bit long valued column
16,713
public RowBuilder floatCol ( String name ) { ColumnFloat column = new ColumnFloat ( _columns . size ( ) , name , _offset ) ; _offset += column . length ( ) ; _columns . add ( column ) ; return this ; }
Creates a float valued column .
16,714
public RowBuilder doubleCol ( String name ) { ColumnDouble column = new ColumnDouble ( _columns . size ( ) , name , _offset ) ; _offset += column . length ( ) ; _columns . add ( column ) ; return this ; }
Creates a double valued column .
16,715
public RowBuilder timestampCol ( String name ) { Column column = new ColumnTimestamp ( _columns . size ( ) , name , _offset ) ; _offset += column . length ( ) ; _columns . add ( column ) ; return this ; }
timestamp valued column .
16,716
public RowBuilder identityCol ( String name ) { Column column = new ColumnIdentity ( _columns . size ( ) , name , _offset ) ; _offset += column . length ( ) ; _columns . add ( column ) ; return this ; }
identity valued column .
16,717
public int getInt ( String name ) { Integer value = ( Integer ) get ( name ) ; if ( value != null ) return value . intValue ( ) ; else return 0 ; }
Returns the annotation value .
16,718
public < T > void publisher ( Class < T > api , Result < T > result ) { String path = api . getName ( ) ; String address = address ( path ) ; ServicesAmp manager = ServicesAmp . current ( ) ; ServiceRefAmp pubRef = manager . service ( address ) ; result . ok ( pubRef . as ( api ) ) ; }
Publish to a location .
16,719
public InputStream getResourceAsStream ( String name ) { Source path ; path = getPath ( name ) ; if ( path != null && path . canRead ( ) ) { try { return path . inputStream ( ) ; } catch ( Exception e ) { } } return null ; }
Opens the stream to the resource .
16,720
public static JarPath create ( PathImpl backing ) { backing = backing . unwrap ( ) ; if ( backing instanceof JarPath ) { return ( JarPath ) backing ; } JarPath path = _jarCache . get ( backing ) ; if ( path == null ) { path = new JarPath ( null , "/" , "/" , backing ) ; _jarCache . put ( backing , path ) ; } return path ; }
Creates a new root Jar path .
16,721
public void write ( LineMap lineMap ) throws IOException { _os . println ( "SMAP" ) ; _os . println ( lineMap . getDestFilename ( ) ) ; _os . println ( _sourceType ) ; _os . println ( "*S " + _sourceType ) ; IntMap fileMap = new IntMap ( ) ; _os . println ( "*F" ) ; Iterator < LineMap . Line > iter = lineMap . iterator ( ) ; while ( iter . hasNext ( ) ) { LineMap . Line line = iter . next ( ) ; String filename = line . getSourceFilename ( ) ; int index = fileMap . get ( filename ) ; if ( index < 0 ) { index = fileMap . size ( ) + 1 ; fileMap . put ( filename , index ) ; if ( filename . indexOf ( '/' ) >= 0 ) { int p = filename . lastIndexOf ( '/' ) ; _os . println ( "+ " + index + " " + filename . substring ( p + 1 ) ) ; if ( filename . startsWith ( "/" ) ) _os . println ( filename . substring ( 1 ) ) ; else _os . println ( filename ) ; } else _os . println ( index + " " + filename ) ; } } _os . println ( "*L" ) ; int size = lineMap . size ( ) ; int lastIndex = 0 ; for ( int i = 0 ; i < size ; i ++ ) { LineMap . Line line = lineMap . get ( i ) ; String filename = line . getSourceFilename ( ) ; int index = fileMap . get ( filename ) ; String fileMarker = "" ; _os . print ( line . getSourceLine ( ) ) ; _os . print ( "#" + index ) ; if ( line . getRepeatCount ( ) > 1 ) _os . print ( "," + line . getRepeatCount ( ) ) ; _os . print ( ":" ) ; _os . print ( line . getDestinationLine ( ) ) ; if ( line . getDestinationIncrement ( ) > 1 ) _os . print ( "," + line . getDestinationIncrement ( ) ) ; _os . println ( ) ; } _os . println ( "*E" ) ; }
Writes the line map
16,722
public boolean isIdleAlmostExpired ( long delta ) { long now = CurrentTime . currentTime ( ) ; return ( _pool . getLoadBalanceIdleTime ( ) < now - _idleStartTime + delta ) ; }
Returns true if nearing end of free time .
16,723
public void free ( long idleStartTime ) { if ( _is == null ) { IllegalStateException exn = new IllegalStateException ( L . l ( "{0} unexpected free of closed stream" , this ) ) ; exn . fillInStackTrace ( ) ; log . log ( Level . FINE , exn . toString ( ) , exn ) ; return ; } long requestStartTime = _requestStartTime ; _requestStartTime = 0 ; if ( requestStartTime > 0 ) _requestTimeProbe . end ( requestStartTime ) ; if ( idleStartTime <= 0 ) { idleStartTime = _is . getReadTime ( ) ; if ( idleStartTime <= 0 ) { idleStartTime = CurrentTime . currentTime ( ) ; } } _idleStartTime = idleStartTime ; _idleProbe . start ( ) ; _isIdle = true ; _pool . free ( this ) ; }
Adds the stream to the free pool .
16,724
public void write ( byte [ ] buf , int offset , int length , boolean isEnd ) throws IOException { int end = offset + length ; while ( offset < end ) { int ch1 = buf [ offset ++ ] & 0xff ; if ( ch1 < 0x80 ) os . write ( ch1 ) ; else if ( ( ch1 & 0xe0 ) == 0xc0 ) { if ( offset >= end ) throw new EOFException ( "unexpected end of file in utf8 character" ) ; int ch2 = buf [ offset ++ ] & 0xff ; if ( ( ch2 & 0xc0 ) != 0x80 ) throw new CharConversionException ( "illegal utf8 encoding" ) ; os . write ( ( ( ch1 & 0x1f ) << 6 ) + ( ch2 & 0x3f ) ) ; } else if ( ( ch1 & 0xf0 ) == 0xe0 ) { if ( offset + 1 >= end ) throw new EOFException ( "unexpected end of file in utf8 character" ) ; int ch2 = buf [ offset ++ ] & 0xff ; int ch3 = buf [ offset ++ ] & 0xff ; if ( ( ch2 & 0xc0 ) != 0x80 ) throw new CharConversionException ( "illegal utf8 encoding" ) ; if ( ( ch3 & 0xc0 ) != 0x80 ) throw new CharConversionException ( "illegal utf8 encoding" ) ; os . write ( ( ( ch1 & 0x1f ) << 12 ) + ( ( ch2 & 0x3f ) << 6 ) + ( ch3 & 0x3f ) ) ; } else throw new CharConversionException ( "illegal utf8 encoding at (" + ( int ) ch1 + ")" ) ; } }
Implementation of the writer write .
16,725
public static String getMimeName ( String encoding ) { if ( encoding == null ) return null ; String value = _mimeName . get ( encoding ) ; if ( value != null ) return value ; String upper = normalize ( encoding ) ; String lookup = _mimeName . get ( upper ) ; value = lookup == null ? upper : lookup ; _mimeName . put ( encoding , value ) ; return value ; }
Returns the canonical mime name for the given character encoding .
16,726
public static String getMimeName ( Locale locale ) { if ( locale == null ) return "utf-8" ; String mimeName = _localeName . get ( locale . toString ( ) ) ; if ( mimeName == null ) mimeName = _localeName . get ( locale . getLanguage ( ) ) ; if ( mimeName == null ) return "utf-8" ; else return mimeName ; }
Returns the canonical mime name for the given locale .
16,727
public static EncodingWriter getWriteEncoding ( String encoding ) { if ( encoding == null ) encoding = "iso-8859-1" ; EncodingWriter factory = _writeEncodingFactories . get ( encoding ) ; if ( factory != null ) return factory . create ( ) ; factory = _writeEncodingFactories . get ( encoding ) ; if ( factory == null ) { try { String javaEncoding = Encoding . getJavaName ( encoding ) ; if ( javaEncoding == null ) javaEncoding = "ISO8859_1" ; String className = "com.caucho.v5.vfs.i18n." + javaEncoding + "Writer" ; Class < ? > cl = Class . forName ( className ) ; factory = ( EncodingWriter ) cl . newInstance ( ) ; factory . setJavaEncoding ( javaEncoding ) ; } catch ( Throwable e ) { } if ( factory == null ) { factory = new JDKWriter ( ) ; String javaEncoding = Encoding . getJavaName ( encoding ) ; if ( javaEncoding == null ) javaEncoding = "ISO8859_1" ; factory . setJavaEncoding ( javaEncoding ) ; } _writeEncodingFactories . put ( encoding , factory ) ; } return factory . create ( encoding ) ; }
Returns an EncodingWriter to translate characters to bytes .
16,728
public static String getJavaName ( String encoding ) { if ( encoding == null ) return null ; String javaName = _javaName . get ( encoding ) ; if ( javaName != null ) return javaName ; String upper = normalize ( encoding ) ; javaName = _javaName . get ( upper ) ; if ( javaName == null ) { String lookup = _mimeName . get ( upper ) ; if ( lookup != null ) javaName = _javaName . get ( lookup ) ; } if ( javaName == null ) javaName = upper ; _javaName . put ( encoding , javaName ) ; return javaName ; }
Returns the Java name for the given encoding .
16,729
public static String getJavaName ( Locale locale ) { if ( locale == null ) return null ; return getJavaName ( getMimeName ( locale ) ) ; }
Returns the Java name for the given locale .
16,730
private static String normalize ( String name ) { CharBuffer cb = new CharBuffer ( ) ; int len = name . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { char ch = name . charAt ( i ) ; if ( Character . isLowerCase ( ch ) ) cb . append ( Character . toUpperCase ( ch ) ) ; else if ( ch == '_' ) cb . append ( '-' ) ; else cb . append ( ch ) ; } return cb . close ( ) ; }
Normalize the user s encoding name to avoid case issues .
16,731
public void fsync ( long sequence , K key , Result < Boolean > result ) { scheduleFsync ( sequence , key , result ) ; flush ( ) ; }
Request an fsync for the allocated sequence and request a flush to occur at the next service batch .
16,732
public void scheduleFsync ( long sequence , K key , Result < Boolean > result ) { _requestSequence = Math . max ( _requestSequence , sequence ) ; if ( sequence <= _tailSequence ) { result . ok ( Boolean . TRUE ) ; } else { _storeFsync . addResult ( key , result ) ; } }
Schedule an fsync for the given sequence but do not request a flush . The fsync can occur before the flush depending on other clients .
16,733
public void afterBatch ( ) { long requestSequence = _requestSequence ; if ( ! _isFsync ) { return ; } _isFsync = false ; try { _storeFsync . fsync ( ) ; } catch ( Throwable e ) { e . printStackTrace ( ) ; } finally { _tailSequence = requestSequence ; } }
Completes any fsyncs in a batch .
16,734
public void stream ( OutputStream os , HeadersAmp headers , String from , long qId , String address , String methodName , PodRef podCaller , ResultStream < ? > result , Object [ ] args ) throws IOException { init ( os ) ; OutH3 out = _out ; if ( out == null ) { return ; } if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "hamp-stream-w " + methodName + ( args != null ? Arrays . asList ( args ) : "[]" ) + " {to:" + address + ", from:" + from + "}" ) ; } out . writeLong ( MessageTypeHamp . STREAM . ordinal ( ) ) ; writeHeaders ( out , headers ) ; writeFromAddress ( out , from ) ; out . writeLong ( qId ) ; writeMethod ( out , address , methodName , podCaller ) ; out . writeObject ( result ) ; writeArgs ( out , args ) ; out . flush ( ) ; }
Sends a stream message to a given address
16,735
int insert ( Row row , byte [ ] sourceBuffer , int sourceOffset , BlobOutputStream [ ] blobs ) { int rowHead = _rowHead ; int blobTail = _blobTail ; int rowLength = row . length ( ) ; rowHead -= rowLength ; if ( rowHead < blobTail ) { return - 1 ; } byte [ ] buffer = _buffer ; System . arraycopy ( sourceBuffer , sourceOffset , buffer , rowHead , rowLength ) ; buffer [ rowHead ] = ( byte ) ( ( buffer [ rowHead ] & ~ CODE_MASK ) | INSERT ) ; blobTail = row . insertBlobs ( buffer , rowHead , blobTail , blobs ) ; if ( blobTail < 0 ) { return - 1 ; } setBlobTail ( blobTail ) ; rowHead ( rowHead ) ; validateBlock ( row ) ; return rowHead ; }
Inserts a new row into the block .
16,736
boolean remove ( RowCursor cursor ) { int rowHead = _rowHead ; int blobTail = _blobTail ; rowHead -= cursor . removeLength ( ) ; if ( rowHead < blobTail ) { return false ; } byte [ ] buffer = _buffer ; cursor . getRemove ( buffer , rowHead ) ; rowHead ( rowHead ) ; validateBlock ( cursor . row ( ) ) ; return true ; }
Removes a key by adding a remove entry to the row .
16,737
int findAndFill ( RowCursor cursor ) { int ptr = find ( cursor ) ; if ( ptr >= 0 ) { cursor . setRow ( _buffer , ptr ) ; cursor . setLeafBlock ( this , ptr ) ; } return ptr ; }
Searches for a row matching the cursor s key in the block . If the key is found fill the cursor with the row .
16,738
int find ( RowCursor cursor ) { int rowOffset = _rowHead ; int sortOffset = _rowSortHead ; int rowLength = cursor . length ( ) ; int removeLength = cursor . removeLength ( ) ; byte [ ] buffer = _buffer ; while ( rowOffset < sortOffset ) { int code = buffer [ rowOffset ] & CODE_MASK ; switch ( code ) { case INSERT : if ( cursor . compareKeyRow ( buffer , rowOffset ) == 0 ) { return rowOffset ; } else { rowOffset += rowLength ; break ; } case INSERT_DEAD : rowOffset += rowLength ; break ; case REMOVE : if ( cursor . compareKeyRemove ( buffer , rowOffset ) == 0 ) { return rowOffset ; } else { rowOffset += removeLength ; break ; } default : throw new IllegalStateException ( L . l ( "Corrupted block {0} offset {1} code {2}\n" , this , rowOffset , code ) ) ; } } if ( sortOffset < BLOCK_SIZE ) { return findSorted ( cursor ) ; } return PageLeafImpl . INDEX_UNMATCH ; }
Searches for a row matching the cursor s key .
16,739
boolean first ( RowCursor minCursor , RowCursor resultCursor , boolean isMatch ) { int ptr = _rowHead ; int rowLength = resultCursor . length ( ) ; int removeLength = resultCursor . removeLength ( ) ; int sortOffset = _rowSortHead ; byte [ ] buffer = _buffer ; while ( ptr < sortOffset ) { int code = buffer [ ptr ] & CODE_MASK ; int minCmp ; int cmp ; switch ( code ) { case INSERT : if ( ( minCmp = minCursor . compareKeyRow ( buffer , ptr ) ) <= 0 && ( ( cmp = resultCursor . compareKeyRow ( buffer , ptr ) ) > 0 || cmp == 0 && ! isMatch ) ) { fillMatch ( ptr , resultCursor ) ; if ( minCmp == 0 ) { return true ; } isMatch = true ; } ptr += rowLength ; break ; case INSERT_DEAD : ptr += rowLength ; break ; case REMOVE : if ( ( minCmp = minCursor . compareKeyRemove ( buffer , ptr ) ) <= 0 && ( ( cmp = resultCursor . compareKeyRemove ( buffer , ptr ) ) > 0 || cmp == 0 && ! isMatch ) ) { resultCursor . setRemove ( buffer , ptr ) ; if ( minCmp == 0 ) { return true ; } isMatch = true ; } ptr += removeLength ; break ; default : System . out . println ( "BROKEN_ENTRY:" ) ; return false ; } } if ( sortOffset < BLOCK_SIZE ) { return findFirstSorted ( minCursor , resultCursor , isMatch ) ; } else { return isMatch ; } }
Finds the row with the smallest key larger than minCursor and fills the cursor .
16,740
private boolean findFirstSorted ( RowCursor minCursor , RowCursor resultCursor , boolean isMatch ) { int rowOffset = _rowSortHead ; int rowLength = resultCursor . length ( ) ; int cmp = resultCursor . compareKey ( _keyMinSort , 0 ) ; if ( cmp < 0 || cmp == 0 && isMatch ) { return isMatch ; } int minCmp = minCursor . compareKey ( _keyMaxSort , 0 ) ; if ( minCmp > 0 ) { return isMatch ; } minCmp = minCursor . compareKey ( _keyMinSort , 0 ) ; if ( minCmp <= 0 ) { fillMatch ( BLOCK_SIZE - rowLength , resultCursor ) ; return true ; } int length = ( BLOCK_SIZE - rowOffset ) / rowLength - 1 ; while ( length > 0 ) { int pivot = length / 2 ; int pivotOffset = rowOffset + pivot * rowLength ; minCmp = minCursor . compareKeyRow ( _buffer , pivotOffset ) ; if ( minCmp == 0 ) { return fillMatch ( pivotOffset , resultCursor ) ; } else if ( minCmp > 0 ) { length = pivot ; continue ; } cmp = resultCursor . compareKeyRow ( _buffer , pivotOffset ) ; if ( cmp > 0 ) { isMatch = true ; fillMatch ( pivotOffset , resultCursor ) ; } rowOffset = pivotOffset + rowLength ; length = length - pivot - 1 ; } return isMatch ; }
In a sorted block find the minimum key less than the currentResult and greater than the min .
16,741
byte [ ] getFirstKey ( TableKelp table ) { int keyOffset = table . getKeyOffset ( ) ; int keyLength = table . getKeyLength ( ) ; int offset = _rowHead + keyOffset ; byte [ ] key = new byte [ keyLength ] ; byte [ ] buffer = getBuffer ( ) ; System . arraycopy ( buffer , offset , key , 0 , keyLength ) ; return key ; }
Returns the first key in the block .
16,742
void fillEntryTree ( Set < PageLeafEntry > entries , Row row ) { int ptr = _rowHead ; byte [ ] buffer = _buffer ; while ( ptr < BLOCK_SIZE ) { int code = buffer [ ptr ] & CODE_MASK ; int len = getLength ( code , row ) ; if ( code == INSERT || code == REMOVE ) { PageLeafEntry entry = new PageLeafEntry ( this , row , ptr , len , code ) ; entries . add ( entry ) ; } ptr += len ; } }
Fills the entry tree map with entries from the block .
16,743
void validateBlock ( Row row ) { if ( ! row . getDatabase ( ) . isValidate ( ) ) { return ; } int rowHead = _rowHead ; int blobTail = _blobTail ; if ( rowHead < blobTail ) { throw new IllegalStateException ( this + " rowHead:" + rowHead + " blobTail:" + blobTail ) ; } int rowOffset = _rowHead ; byte [ ] buffer = _buffer ; while ( rowOffset < BLOCK_SIZE ) { int code = buffer [ rowOffset ] & CODE_MASK ; switch ( code ) { case INSERT : row . validate ( buffer , rowOffset , rowHead , blobTail ) ; break ; case INSERT_DEAD : case REMOVE : break ; default : throw new IllegalStateException ( this + " " + rowOffset + " " + code + " unknown code" ) ; } int len = getLength ( code , row ) ; if ( len < 0 || len + rowOffset > BLOCK_SIZE ) { throw new IllegalStateException ( this + " " + rowOffset + " code:" + code + " len:" + len + " invalid len" ) ; } rowOffset += len ; } }
Validate the block checking that row lengths and values are sensible .
16,744
void fillDeltaEntries ( Set < PageLeafEntry > entries , Row row , int tail ) { int rowOffset = _rowHead ; byte [ ] buffer = _buffer ; while ( rowOffset < tail ) { int code = buffer [ rowOffset ] & CODE_MASK ; int len = getLength ( code , row ) ; if ( code == INSERT || code == REMOVE ) { PageLeafEntry entry = new PageLeafEntry ( this , row , rowOffset , len , code ) ; entries . add ( entry ) ; } rowOffset += len ; } }
Fill the entry set from the tree map .
16,745
void writeCheckpointFull ( OutputStream os , int rowHead ) throws IOException { BitsUtil . writeInt16 ( os , _blobTail ) ; os . write ( _buffer , 0 , _blobTail ) ; rowHead = Math . max ( rowHead , _rowHead ) ; int rowLength = _buffer . length - rowHead ; BitsUtil . writeInt16 ( os , rowLength ) ; os . write ( _buffer , rowHead , rowLength ) ; }
Writes the block to the checkpoint stream .
16,746
void readCheckpointFull ( InputStream is ) throws IOException { _blobTail = BitsUtil . readInt16 ( is ) ; if ( _blobTail < 0 || _buffer . length < _blobTail ) { throw new IllegalStateException ( "Invalid blob tail: " + _blobTail + " " + this ) ; } byte [ ] buffer = _buffer ; IoUtil . readAll ( is , buffer , 0 , _blobTail ) ; int rowLength = BitsUtil . readInt16 ( is ) ; rowHead ( _buffer . length - rowLength ) ; int rowHead = rowHead ( ) ; if ( rowHead < getBlobTail ( ) || buffer . length < rowHead ) { throw new IllegalStateException ( L . l ( "Invalid row-head={0} blob-tail={1}" , rowHead ( ) , getBlobTail ( ) ) ) ; } IoUtil . readAll ( is , buffer , rowHead , buffer . length - rowHead ) ; }
Reads a full block checkpoint .
16,747
public void shutdown ( ShutdownModeAmp mode ) { QueryMap queryMap = _queryMapRef . get ( ) ; if ( queryMap != null ) { queryMap . close ( ) ; } }
Closes the mailbox
16,748
public void add ( int i ) { if ( _data . length <= _size ) expand ( _size + 1 ) ; _data [ _size ++ ] = i ; }
Adds an integer to the array .
16,749
public void add ( IntArray array ) { if ( _data . length <= array . _size ) expand ( _size + array . _size ) ; for ( int i = 0 ; i < array . _size ; i ++ ) _data [ _size ++ ] = array . _data [ i ] ; }
Appends the integers in array to the end of this array .
16,750
public void add ( int i , int value ) { expand ( _size + 1 ) ; System . arraycopy ( _data , i , _data , i + 1 , _size - i ) ; _data [ i ] = value ; _size ++ ; }
Inserts an integer into the array .
16,751
public void setLength ( int size ) { expand ( size ) ; for ( int i = _size ; i < size ; i ++ ) _data [ i ] = 0 ; _size = size ; }
Sets the length of the array filling with zero if necessary .
16,752
public boolean contains ( int test ) { int [ ] data = _data ; for ( int i = _size - 1 ; i >= 0 ; i -- ) { if ( data [ i ] == test ) return true ; } return false ; }
Returns true if the array contains and integer equal to test .
16,753
public boolean isSubset ( IntArray subset ) { int [ ] subData = subset . _data ; for ( int i = subset . _size - 1 ; i >= 0 ; i -- ) { if ( ! contains ( subData [ i ] ) ) return false ; } return true ; }
True if all the integers in subset are contained in the array .
16,754
public void union ( IntArray newArray ) { for ( int i = 0 ; i < newArray . _size ; i ++ ) { if ( ! contains ( newArray . _data [ i ] ) ) add ( newArray . _data [ i ] ) ; } }
Adds the members of newArray to the list if they are not already members of the array .
16,755
@ Path ( "{id}" ) public IAgreement getAgreementById ( @ PathParam ( "id" ) String agreementId ) throws NotFoundException { logger . debug ( "StartOf getAgreementById REQUEST for /agreements/" + agreementId ) ; AgreementHelperE agreementRestHelper = getAgreementHelper ( ) ; IAgreement agreement = agreementRestHelper . getAgreementByID ( agreementId ) ; if ( agreement == null ) { logger . info ( "getAgreementById NotFoundException: There is no agreement with id " + agreementId + " in the SLA Repository Database" ) ; throw new NotFoundException ( "There is no agreement with id " + agreementId + " in the SLA Repository Database" ) ; } logger . debug ( "EndOf getAgreementById" ) ; return agreement ; }
Gets the information of an specific agreement . If the agreement it is not in the database it returns 404 with empty payload
16,756
@ Path ( "{id}/context" ) public eu . atos . sla . parser . data . wsag . Context getAgreementContextById ( @ PathParam ( "id" ) String agreementId ) throws NotFoundException , InternalException { logger . debug ( "StartOf getAgreementContextById REQUEST for /agreements/{}/context" , agreementId ) ; AgreementHelperE agreementRestHelper = getAgreementHelper ( ) ; eu . atos . sla . parser . data . wsag . Context context ; try { context = agreementRestHelper . getAgreementContextByID ( agreementId ) ; } catch ( InternalHelperException e ) { logger . error ( "getAgreementContextById InternalException" , e ) ; throw new InternalException ( e . getMessage ( ) ) ; } if ( context == null ) { logger . info ( "getAgreementContextById NotFoundException: There is no agreement with id " + agreementId + " in the SLA Repository Database" ) ; throw new NotFoundException ( "There is no agreement with id " + agreementId + " in the SLA Repository Database" ) ; } logger . debug ( "EndOf getAgreementContextById" ) ; return context ; }
Gets the context information of an specific agreement .
16,757
public static PollTcpManager createJni ( ) { try { return ( PollTcpManager ) SelectManagerJni . create ( ) ; } catch ( Throwable e ) { log . finer ( e . toString ( ) ) ; } return null ; }
Sets the timeout .
16,758
public void onFail ( ) { _lastFailTime = CurrentTime . currentTime ( ) ; if ( _firstFailTime == 0 ) { _firstFailTime = _lastFailTime ; } _firstSuccessTime = 0 ; toState ( State . FAIL ) ; long recoverTimeout = _dynamicRecoverTimeout . get ( ) ; long nextRecoverTimeout = Math . min ( recoverTimeout + 1000L , _recoverTimeout ) ; _dynamicRecoverTimeout . compareAndSet ( recoverTimeout , nextRecoverTimeout ) ; }
Called when the connection fails .
16,759
public boolean startConnection ( ) { State state = _state . get ( ) ; if ( state . isActive ( ) ) { _connectionCount . incrementAndGet ( ) ; return true ; } long now = CurrentTime . currentTime ( ) ; long lastFailTime = _lastFailTime ; long recoverTimeout = _dynamicRecoverTimeout . get ( ) ; if ( now < lastFailTime + recoverTimeout ) { return false ; } int count ; do { count = _connectionCount . get ( ) ; if ( count > 0 ) { return false ; } } while ( ! _connectionCount . compareAndSet ( count , count + 1 ) ) ; return true ; }
Start a new connection . Returns true if the connection can be started .
16,760
public void addShort ( int offset , int value ) { insertCode ( offset , 2 ) ; _code . set ( offset + 0 , value >> 8 ) ; _code . set ( offset + 1 , value ) ; }
Adds a short to the code .
16,761
public void add ( int offset , byte [ ] buffer , int bufOffset , int length ) { insertCode ( offset , length ) ; _code . set ( offset , buffer , bufOffset , length ) ; }
Adds a byte to the code .
16,762
public void update ( ) { byte [ ] code = new byte [ _code . size ( ) ] ; System . arraycopy ( _code . getBuffer ( ) , 0 , code , 0 , _code . size ( ) ) ; _codeAttr . setCode ( code ) ; if ( _changeLength ) { ArrayList < Attribute > attrList = getCodeAttribute ( ) . getAttributes ( ) ; for ( int i = attrList . size ( ) - 1 ; i >= 0 ; i -- ) { Attribute attr = attrList . get ( i ) ; if ( attr . getName ( ) . equals ( "LineNumberTable" ) ) attrList . remove ( i ) ; } } }
Updates the code .
16,763
public ServiceRefAmp createLinkService ( String path , PodRef podCaller ) { StubLink actorLink ; String address = _scheme + "//" + _serviceRefOut . address ( ) + path ; ServiceRefAmp parentRef = _actorOut . getServiceRef ( ) ; if ( _queryMapRef != null ) { actorLink = new StubLinkUnidir ( _manager , path , parentRef , _queryMapRef , podCaller , _actorOut ) ; } else { actorLink = new StubLink ( _manager , path , parentRef , podCaller , _actorOut ) ; } ServiceRefAmp linkRef = _serviceRefOut . pin ( actorLink , address ) ; ServiceRefAmp clientRef = new ServiceRefClient ( address , linkRef . stub ( ) , linkRef . inbox ( ) ) ; actorLink . initSelfRef ( clientRef ) ; return clientRef ; }
Return the serviceRef for a foreign path and calling pod .
16,764
public long get ( ) { long now = CurrentTime . currentTime ( ) / 1000 ; long oldSequence ; long newSequence ; do { oldSequence = _sequence . get ( ) ; long oldTime = oldSequence >>> _timeOffset ; if ( oldTime != now ) { newSequence = ( ( now << _timeOffset ) + ( randomLong ( ) & _sequenceRandomMask ) ) ; } else { newSequence = oldSequence + _sequenceIncrement ; } } while ( ! _sequence . compareAndSet ( oldSequence , newSequence ) ) ; long id = ( ( now << _timeOffset ) | _node | ( newSequence & _sequenceMask ) ) ; return id ; }
Returns the next id .
16,765
public static KbServerSideException fromThrowable ( Throwable cause ) { return ( cause instanceof KbServerSideException ) ? ( KbServerSideException ) cause : new KbServerSideException ( cause ) ; }
Converts a Throwable to a KbServerSideException . If the Throwable is a KbServerSideException it will be passed through unmodified ; otherwise it will be wrapped in a new KbServerSideException .
16,766
public static KbServerSideException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof KbServerSideException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( KbServerSideException ) cause : new KbServerSideException ( message , cause ) ; }
Converts a Throwable to a KbServerSideException with the specified detail message . If the Throwable is a KbServerSideException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new KbServerSideException with the detail message .
16,767
public static KbTypeConflictException fromThrowable ( Throwable cause ) { return ( cause instanceof KbTypeConflictException ) ? ( KbTypeConflictException ) cause : new KbTypeConflictException ( cause ) ; }
Converts a Throwable to a KbTypeConflictException . If the Throwable is a KbTypeConflictException it will be passed through unmodified ; otherwise it will be wrapped in a new KbTypeConflictException .
16,768
public static KbTypeConflictException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof KbTypeConflictException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( KbTypeConflictException ) cause : new KbTypeConflictException ( message , cause ) ; }
Converts a Throwable to a KbTypeConflictException with the specified detail message . If the Throwable is a KbTypeConflictException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new KbTypeConflictException with the detail message .
16,769
protected static String intsToCommaDelimitedString ( int [ ] ints ) { if ( ints == null ) { return "" ; } StringBuilder result = new StringBuilder ( ) ; for ( int i = 0 ; i < ints . length ; i ++ ) { result . append ( ints [ i ] ) ; if ( i < ( ints . length - 1 ) ) { result . append ( ", " ) ; } } return result . toString ( ) ; }
Convert an array of ints into a comma delimited string
16,770
public void init ( FilterConfig filterConfig ) throws ServletException { String comaDelimitedSecuredRemoteAddresses = filterConfig . getInitParameter ( SECURED_REMOTE_ADDRESSES_PARAMETER ) ; if ( comaDelimitedSecuredRemoteAddresses != null ) { setSecuredRemoteAdresses ( comaDelimitedSecuredRemoteAddresses ) ; } }
Compile the secured remote addresses patterns .
16,771
public static QueryException fromThrowable ( Throwable cause ) { return ( cause instanceof QueryException ) ? ( QueryException ) cause : new QueryException ( cause ) ; }
Converts a Throwable to a QueryException . If the Throwable is a QueryException it will be passed through unmodified ; otherwise it will be wrapped in a new QueryException .
16,772
public static QueryException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof QueryException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( QueryException ) cause : new QueryException ( message , cause ) ; }
Converts a Throwable to a QueryException with the specified detail message . If the Throwable is a QueryException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new QueryException with the detail message .
16,773
public static SessionServiceException fromThrowable ( Class interfaceClass , Throwable cause ) { return ( cause instanceof SessionServiceException && Objects . equals ( interfaceClass , ( ( SessionServiceException ) cause ) . getInterfaceClass ( ) ) ) ? ( SessionServiceException ) cause : new SessionServiceException ( interfaceClass , cause ) ; }
Converts a Throwable to a SessionServiceException . If the Throwable is a SessionServiceException it will be passed through unmodified ; otherwise it will be wrapped in a new SessionServiceException .
16,774
public static SessionServiceException fromThrowable ( Class interfaceClass , String message , Throwable cause ) { return ( cause instanceof SessionServiceException && Objects . equals ( interfaceClass , ( ( SessionServiceException ) cause ) . getInterfaceClass ( ) ) && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( SessionServiceException ) cause : new SessionServiceException ( interfaceClass , message , cause ) ; }
Converts a Throwable to a SessionServiceException with the specified detail message . If the Throwable is a SessionServiceException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new SessionServiceException with the detail message .
16,775
public static KbTypeException fromThrowable ( Throwable cause ) { return ( cause instanceof KbTypeException ) ? ( KbTypeException ) cause : new KbTypeException ( cause ) ; }
Converts a Throwable to a KbTypeException . If the Throwable is a KbTypeException it will be passed through unmodified ; otherwise it will be wrapped in a new KbTypeException .
16,776
public static KbTypeException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof KbTypeException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( KbTypeException ) cause : new KbTypeException ( message , cause ) ; }
Converts a Throwable to a KbTypeException with the specified detail message . If the Throwable is a KbTypeException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new KbTypeException with the detail message .
16,777
public static SessionCommunicationException fromThrowable ( Throwable cause ) { return ( cause instanceof SessionCommunicationException ) ? ( SessionCommunicationException ) cause : new SessionCommunicationException ( cause ) ; }
Converts a Throwable to a SessionCommunicationException . If the Throwable is a SessionCommunicationException it will be passed through unmodified ; otherwise it will be wrapped in a new SessionCommunicationException .
16,778
public static SessionCommunicationException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof SessionCommunicationException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( SessionCommunicationException ) cause : new SessionCommunicationException ( message , cause ) ; }
Converts a Throwable to a SessionCommunicationException with the specified detail message . If the Throwable is a SessionCommunicationException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new SessionCommunicationException with the detail message .
16,779
public static QueryConstructionException fromThrowable ( Throwable cause ) { return ( cause instanceof QueryConstructionException ) ? ( QueryConstructionException ) cause : new QueryConstructionException ( cause ) ; }
Converts a Throwable to a QueryConstructionException . If the Throwable is a QueryConstructionException it will be passed through unmodified ; otherwise it will be wrapped in a new QueryConstructionException .
16,780
public static QueryConstructionException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof QueryConstructionException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( QueryConstructionException ) cause : new QueryConstructionException ( message , cause ) ; }
Converts a Throwable to a QueryConstructionException with the specified detail message . If the Throwable is a QueryConstructionException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new QueryConstructionException with the detail message .
16,781
public static SessionManagerException fromThrowable ( Throwable cause ) { return ( cause instanceof SessionManagerException ) ? ( SessionManagerException ) cause : new SessionManagerException ( cause ) ; }
Converts a Throwable to a SessionManagerException . If the Throwable is a SessionManagerException it will be passed through unmodified ; otherwise it will be wrapped in a new SessionManagerException .
16,782
public static SessionManagerException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof SessionManagerException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( SessionManagerException ) cause : new SessionManagerException ( message , cause ) ; }
Converts a Throwable to a SessionManagerException with the specified detail message . If the Throwable is a SessionManagerException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new SessionManagerException with the detail message .
16,783
public static InvalidFormulaInContextException fromThrowable ( Throwable cause ) { return ( cause instanceof InvalidFormulaInContextException ) ? ( InvalidFormulaInContextException ) cause : new InvalidFormulaInContextException ( cause ) ; }
Converts a Throwable to a InvalidFormulaInContextException . If the Throwable is a InvalidFormulaInContextException it will be passed through unmodified ; otherwise it will be wrapped in a new InvalidFormulaInContextException .
16,784
public static InvalidFormulaInContextException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof InvalidFormulaInContextException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( InvalidFormulaInContextException ) cause : new InvalidFormulaInContextException ( message , cause ) ; }
Converts a Throwable to a InvalidFormulaInContextException with the specified detail message . If the Throwable is a InvalidFormulaInContextException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new InvalidFormulaInContextException with the detail message .
16,785
public static InvalidNameException fromThrowable ( Throwable cause ) { return ( cause instanceof InvalidNameException ) ? ( InvalidNameException ) cause : new InvalidNameException ( cause ) ; }
Converts a Throwable to a InvalidNameException . If the Throwable is a InvalidNameException it will be passed through unmodified ; otherwise it will be wrapped in a new InvalidNameException .
16,786
public static InvalidNameException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof InvalidNameException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( InvalidNameException ) cause : new InvalidNameException ( message , cause ) ; }
Converts a Throwable to a InvalidNameException with the specified detail message . If the Throwable is a InvalidNameException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new InvalidNameException with the detail message .
16,787
public static SessionConfigurationException fromThrowable ( Throwable cause ) { return ( cause instanceof SessionConfigurationException ) ? ( SessionConfigurationException ) cause : new SessionConfigurationException ( cause ) ; }
Converts a Throwable to a SessionConfigurationException . If the Throwable is a SessionConfigurationException it will be passed through unmodified ; otherwise it will be wrapped in a new SessionConfigurationException .
16,788
public static SessionConfigurationException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof SessionConfigurationException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( SessionConfigurationException ) cause : new SessionConfigurationException ( message , cause ) ; }
Converts a Throwable to a SessionConfigurationException with the specified detail message . If the Throwable is a SessionConfigurationException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new SessionConfigurationException with the detail message .
16,789
public static SessionInitializationException fromThrowable ( Throwable cause ) { return ( cause instanceof SessionInitializationException ) ? ( SessionInitializationException ) cause : new SessionInitializationException ( cause ) ; }
Converts a Throwable to a SessionInitializationException . If the Throwable is a SessionInitializationException it will be passed through unmodified ; otherwise it will be wrapped in a new SessionInitializationException .
16,790
public static SessionInitializationException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof SessionInitializationException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( SessionInitializationException ) cause : new SessionInitializationException ( message , cause ) ; }
Converts a Throwable to a SessionInitializationException with the specified detail message . If the Throwable is a SessionInitializationException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new SessionInitializationException with the detail message .
16,791
public static SessionException fromThrowable ( Throwable cause ) { return ( cause instanceof SessionException ) ? ( SessionException ) cause : new SessionException ( cause ) ; }
Converts a Throwable to a SessionException . If the Throwable is a SessionException it will be passed through unmodified ; otherwise it will be wrapped in a new SessionException .
16,792
public static SessionException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof SessionException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( SessionException ) cause : new SessionException ( message , cause ) ; }
Converts a Throwable to a SessionException with the specified detail message . If the Throwable is a SessionException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new SessionException with the detail message .
16,793
public static VariableArityException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof VariableArityException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( VariableArityException ) cause : new VariableArityException ( message , cause ) ; }
Converts a Throwable to a VariableArityException with the specified detail message . If the Throwable is a VariableArityException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new VariableArityException with the detail message .
16,794
public static KbObjectNotFoundException fromThrowable ( Throwable cause ) { return ( cause instanceof KbObjectNotFoundException ) ? ( KbObjectNotFoundException ) cause : new KbObjectNotFoundException ( cause ) ; }
Converts a Throwable to a KbObjectNotFoundException . If the Throwable is a KbObjectNotFoundException it will be passed through unmodified ; otherwise it will be wrapped in a new KbObjectNotFoundException .
16,795
public static KbObjectNotFoundException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof KbObjectNotFoundException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( KbObjectNotFoundException ) cause : new KbObjectNotFoundException ( message , cause ) ; }
Converts a Throwable to a KbObjectNotFoundException with the specified detail message . If the Throwable is a KbObjectNotFoundException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new KbObjectNotFoundException with the detail message .
16,796
public static KbRuntimeException fromThrowable ( Throwable cause ) { return ( cause instanceof KbRuntimeException ) ? ( KbRuntimeException ) cause : new KbRuntimeException ( cause ) ; }
Converts a Throwable to a KbRuntimeException . If the Throwable is a KbRuntimeException it will be passed through unmodified ; otherwise it will be wrapped in a new KbRuntimeException .
16,797
public static KbRuntimeException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof KbRuntimeException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( KbRuntimeException ) cause : new KbRuntimeException ( message , cause ) ; }
Converts a Throwable to a KbRuntimeException with the specified detail message . If the Throwable is a KbRuntimeException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new KbRuntimeException with the detail message .
16,798
public static StaleKbObjectException fromThrowable ( Throwable cause ) { return ( cause instanceof StaleKbObjectException ) ? ( StaleKbObjectException ) cause : new StaleKbObjectException ( cause ) ; }
Converts a Throwable to a StaleKbObjectException . If the Throwable is a StaleKbObjectException it will be passed through unmodified ; otherwise it will be wrapped in a new StaleKbObjectException .
16,799
public static StaleKbObjectException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof StaleKbObjectException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( StaleKbObjectException ) cause : new StaleKbObjectException ( message , cause ) ; }
Converts a Throwable to a StaleKbObjectException with the specified detail message . If the Throwable is a StaleKbObjectException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new StaleKbObjectException with the detail message .