idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
141,000
public final Object assemble ( Serializable cached , Object owner ) throws HibernateException { if ( cached != null ) { log . trace ( "assemble " + cached + " (" + cached . getClass ( ) + "), owner is " + owner ) ; } return cached ; }
Returns the cached value .
141,001
public LobbyStatus createGroupFinderLobby ( int type , String uuid ) { return client . sendRpcAndWait ( SERVICE , "createGroupFinderLobby" , type , uuid ) ; }
Create a group finder lobby . Might be deprecated?
141,002
public Object call ( String uuid , GameMode mode , String procCall , JsonObject object ) { return client . sendRpcAndWait ( SERVICE , "call" , uuid , mode . name ( ) , procCall , object . toString ( ) ) ; }
Call a group finder action
141,003
@ SuppressWarnings ( "unchecked" ) public List < T > run ( final Object ... iArgs ) { final ODatabaseRecord database = ODatabaseRecordThreadLocal . INSTANCE . get ( ) ; if ( database == null ) throw new OQueryParsingException ( "No database configured" ) ; setParameters ( iArgs ) ; return ( List < T > ) database . getS...
Delegates to the OQueryExecutor the query execution .
141,004
public AddressbookQuery limitNumberOfResults ( int limit ) { if ( limit > 0 ) { addLimit ( WebDavSearch . NRESULTS , limit ) ; } else { removeLimit ( WebDavSearch . NRESULTS ) ; } return this ; }
Limit the number of results in the response if supported by the server . A negative value will remove the limit .
141,005
public void close ( ) { for ( Entry < String , OResourcePool < String , DB > > pool : pools . entrySet ( ) ) { for ( DB db : pool . getValue ( ) . getResources ( ) ) { pool . getValue ( ) . close ( ) ; try { OLogManager . instance ( ) . debug ( this , "Closing pooled database '%s'..." , db . getName ( ) ) ; ( ( ODataba...
Closes all the databases .
141,006
public static boolean isMultiValue ( final Class < ? > iType ) { return ( iType . isArray ( ) || Collection . class . isAssignableFrom ( iType ) || Map . class . isAssignableFrom ( iType ) ) ; }
Checks if a class is a multi - value type .
141,007
public static int getSize ( final Object iObject ) { if ( iObject == null ) return 0 ; if ( ! isMultiValue ( iObject ) ) return 0 ; if ( iObject instanceof Collection < ? > ) return ( ( Collection < Object > ) iObject ) . size ( ) ; if ( iObject instanceof Map < ? , ? > ) return ( ( Map < ? , Object > ) iObject ) . siz...
Returns the size of the multi - value object
141,008
public static boolean pauseCurrentThread ( long iTime ) { try { if ( iTime <= 0 ) iTime = Long . MAX_VALUE ; Thread . sleep ( iTime ) ; return true ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; return false ; } }
Pauses current thread until iTime timeout or a wake up by another thread .
141,009
public Stream < String > containing ( double lat , double lon ) { return shapes . keySet ( ) . stream ( ) . filter ( name -> shapes . get ( name ) . contains ( lat , lon ) ) ; }
Returns the names of those shapes that contain the given lat lon .
141,010
public OQuery < T > setFetchPlan ( final String fetchPlan ) { OFetchHelper . checkFetchPlanValid ( fetchPlan ) ; if ( fetchPlan != null && fetchPlan . length ( ) == 0 ) this . fetchPlan = null ; else this . fetchPlan = fetchPlan ; return this ; }
Sets the fetch plan to use .
141,011
public static ITargetIdentifier field ( final String fieldName ) { return new ITargetIdentifier ( ) { public IDependencyInjector of ( final Object target ) { return new FieldInjector ( target , fieldName ) ; } } ; }
Returns a target identifier that uses an injector that injects directly to a member field regardless of the field s visibility .
141,012
public static ITargetInjector with ( final IInjectionStrategy strategy ) { return new ITargetInjector ( ) { public void bean ( Object target ) { strategy . inject ( target ) ; } } ; }
Returns an injector implementation which delegates actual injection to the given strategy when provided with a target to inject .
141,013
public OQueryContextNative key ( final Object iKey ) { if ( finalResult != null && finalResult . booleanValue ( ) ) return this ; if ( iKey == null ) return error ( ) ; if ( currentValue != null && currentValue instanceof Map ) currentValue = ( ( Map < Object , Object > ) currentValue ) . get ( iKey ) ; return this ; }
Sets as current value the map s value by key .
141,014
public synchronized RESPONSE_TYPE getValue ( final RESOURCE_TYPE iResource , final long iTimeout ) { if ( OLogManager . instance ( ) . isDebugEnabled ( ) ) OLogManager . instance ( ) . debug ( this , "Thread [" + Thread . currentThread ( ) . getId ( ) + "] is waiting for the resource " + iResource + ( iTimeout <= 0 ? "...
Wait until the requested resource is unlocked . Put the current thread in sleep until timeout or is waked up by an unlock .
141,015
public synchronized void setClassHandler ( final OEntityManagerClassHandler iClassHandler ) { for ( Entry < String , Class < ? > > entry : classHandler . getClassesEntrySet ( ) ) { iClassHandler . registerEntityClass ( entry . getValue ( ) ) ; } this . classHandler = iClassHandler ; }
Sets the received handler as default and merges the classes all together .
141,016
@ Path ( "create" ) public Response createFromRedirect ( ) { KeycloakPrincipal principal = ( KeycloakPrincipal ) sessionContext . getCallerPrincipal ( ) ; RefreshableKeycloakSecurityContext kcSecurityContext = ( RefreshableKeycloakSecurityContext ) principal . getKeycloakSecurityContext ( ) ; String refreshToken = kcSe...
This endpoint is called when Keycloak redirects the logged in user to our application .
141,017
@ Path ( "create" ) @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) public Response createFromBasicAuth ( ) throws Exception { return doCreateFromBasicAuth ( null ) ; }
This endpoint is called when a client makes a REST call with basic auth as APPLICATION_FORM_URLENCODED without parameters .
141,018
public OStorageConfiguration load ( ) throws OSerializationException { final byte [ ] record = storage . readRecord ( CONFIG_RID , null , false , null ) . buffer ; if ( record == null ) throw new OStorageException ( "Cannot load database's configuration. The database seems to be corrupted." ) ; fromStream ( record ) ; ...
This method load the record information by the internal cluster segment . It s for compatibility with older database than 0 . 9 . 25 .
141,019
public static < T > Option < T > some ( T t ) { return new Option . Some < T > ( t ) ; }
Gets the some object wrapping the given value .
141,020
public static < T > Option < T > of ( T t ) { return t == null ? Option . < T > none ( ) : some ( t ) ; }
Wraps anything .
141,021
public PropertyRequest addProperty ( ElementDescriptor < ? > property ) { if ( mProp == null ) { mProp = new HashMap < ElementDescriptor < ? > , Object > ( 16 ) ; } mProp . put ( property , null ) ; return this ; }
Add another property to the list of requested properties .
141,022
public void setOption ( Option option ) { switch ( option ) { case ARRAY_ORDER_SIGNIFICANT : arrayComparator = new DefaultArrayNodeComparator ( ) ; break ; case ARRAY_ORDER_INSIGNIFICANT : arrayComparator = new SetArrayNodeComparator ( ) ; break ; case RETURN_PARENT_DIFFS : returnParentDiffs = true ; break ; case RETUR...
Sets an option
141,023
public List < JsonDelta > computeDiff ( String node1 , String node2 ) throws IOException { ObjectMapper mapper = new ObjectMapper ( ) ; return computeDiff ( mapper . readTree ( node1 ) , mapper . readTree ( node2 ) ) ; }
Computes the difference of two JSON strings and returns the differences
141,024
public List < JsonDelta > computeDiff ( JsonNode node1 , JsonNode node2 ) { List < JsonDelta > list = new ArrayList < > ( ) ; computeDiff ( list , new ArrayList < String > ( ) , node1 , node2 ) ; return list ; }
Computes the difference of two JSON nodes and returns the differences
141,025
public boolean computeDiff ( List < JsonDelta > delta , List < String > context , JsonNode node1 , JsonNode node2 ) { boolean ret = false ; if ( context . size ( ) == 0 || filter . includeField ( context ) ) { JsonComparator cmp = getComparator ( context , node1 , node2 ) ; if ( cmp != null ) { ret = cmp . compare ( de...
Returns true if there is a difference
141,026
public JsonComparator getComparator ( List < String > context , JsonNode node1 , JsonNode node2 ) { if ( node1 == null ) { if ( node2 == null ) { return NODIFF_CMP ; } else { return null ; } } else if ( node2 == null ) { return null ; } else { if ( node1 instanceof NullNode ) { if ( node2 instanceof NullNode ) { return...
Returns the comparator for the give field and nodes . This method can be overriden to customize comparison logic .
141,027
public LobbyStatus createGroupFinderLobby ( long queueId , String uuid ) { return client . sendRpcAndWait ( SERVICE , "createGroupFinderLobby" , queueId , uuid ) ; }
Create a groupfinder lobby
141,028
boolean flush ( ) { if ( ! dirty ) return true ; acquireExclusiveLock ( ) ; try { final long timer = OProfiler . getInstance ( ) . startChrono ( ) ; for ( int i = 0 ; i < FORCE_RETRY ; ++ i ) { try { buffer . force ( ) ; dirty = false ; break ; } catch ( Exception e ) { OLogManager . instance ( ) . debug ( this , "Cann...
Flushes the memory mapped buffer to disk only if it s dirty .
141,029
void close ( ) { acquireExclusiveLock ( ) ; try { if ( buffer != null ) { if ( dirty ) buffer . force ( ) ; if ( sunClass != null ) { try { final Method m = sunClass . getMethod ( "cleaner" ) ; final Object cleaner = m . invoke ( buffer ) ; cleaner . getClass ( ) . getMethod ( "clean" ) . invoke ( cleaner ) ; } catch (...
Force closing of file if it s opened yet .
141,030
private Set < Comparable > prepareKeys ( OIndex < ? > index , Object keys ) { final Class < ? > targetType = index . getKeyTypes ( ) [ 0 ] . getDefaultJavaType ( ) ; return convertResult ( keys , targetType ) ; }
Make type conversion of keys for specific index .
141,031
public void validate ( ) throws OValidationException { if ( ODatabaseRecordThreadLocal . INSTANCE . isDefined ( ) && ! getDatabase ( ) . isValidationEnabled ( ) ) return ; checkForLoading ( ) ; checkForFields ( ) ; if ( _clazz != null ) { if ( _clazz . isStrictMode ( ) ) { for ( String f : fieldNames ( ) ) { if ( _claz...
Validates the record following the declared constraints defined in schema such as mandatory notNull min max regexp etc . If the schema is not defined for the current class or there are not constraints then the validation is ignored .
141,032
public < T > void set ( ElementDescriptor < T > property , T value ) { if ( mSet == null ) { mSet = new HashMap < ElementDescriptor < ? > , Object > ( 16 ) ; } mSet . put ( property , value ) ; if ( mRemove != null ) { mRemove . remove ( property ) ; } }
Add a new property with a specific value to the resource .
141,033
public < T > void remove ( ElementDescriptor < T > property ) { if ( mRemove == null ) { mRemove = new HashMap < ElementDescriptor < ? > , Object > ( 16 ) ; } mRemove . put ( property , null ) ; if ( mSet != null ) { mSet . remove ( property ) ; } }
Remove a property from the resource .
141,034
public < T > void clear ( ElementDescriptor < T > property ) { if ( mRemove != null ) { mRemove . remove ( property ) ; } if ( mSet != null ) { mSet . remove ( property ) ; } }
Clear the modification of given property i . e . neither change nor remove the property .
141,035
public void updateRecord ( final ORecordInternal < ? > fresh ) { if ( ! isEnabled ( ) || fresh == null || fresh . isDirty ( ) || fresh . getIdentity ( ) . isNew ( ) || ! fresh . getIdentity ( ) . isValid ( ) || fresh . getIdentity ( ) . getClusterId ( ) == excludedCluster ) return ; if ( fresh . isPinned ( ) == null ||...
Push record to cache . Identifier of record used as access key
141,036
public ColumnList addColumn ( byte [ ] family , byte [ ] qualifier , byte [ ] value ) { columns ( ) . add ( new Column ( family , qualifier , - 1 , value ) ) ; return this ; }
Add a standard HBase column
141,037
public ColumnList addCounter ( byte [ ] family , byte [ ] qualifier , long incr ) { counters ( ) . add ( new Counter ( family , qualifier , incr ) ) ; return this ; }
Add an HBase counter column .
141,038
public Future < Map < Long , List < LeagueList > > > getLeagues ( long ... summoners ) { return new ApiFuture < > ( ( ) -> handler . getLeagues ( summoners ) ) ; }
Get a listing of leagues for the specified summoners
141,039
public Future < Map < Long , List < LeagueItem > > > getLeagueEntries ( long ... summoners ) { return new ApiFuture < > ( ( ) -> handler . getLeagueEntries ( summoners ) ) ; }
Get a listing of all league entries in the summoners leagues
141,040
public Future < List < LeagueList > > getLeagues ( String teamId ) { return new ApiFuture < > ( ( ) -> handler . getLeagues ( teamId ) ) ; }
Get a listing of leagues for the specified team
141,041
public Future < Map < String , List < LeagueList > > > getLeagues ( String ... teamIds ) { return new ApiFuture < > ( ( ) -> handler . getLeagues ( teamIds ) ) ; }
Get a listing of leagues for the specified teams
141,042
public Future < List < LeagueItem > > getLeagueEntries ( String teamId ) { return new ApiFuture < > ( ( ) -> handler . getLeagueEntries ( teamId ) ) ; }
Get a listing of all league entries in the team s leagues
141,043
public Future < Map < String , List < LeagueItem > > > getLeagueEntries ( String ... teamIds ) { return new ApiFuture < > ( ( ) -> handler . getLeagueEntries ( teamIds ) ) ; }
Get a listing of all league entries in the teams leagues
141,044
public Future < MatchDetail > getMatch ( long matchId , boolean includeTimeline ) { return new ApiFuture < > ( ( ) -> handler . getMatch ( matchId , includeTimeline ) ) ; }
Retrieves the specified match .
141,045
public Future < List < MatchSummary > > getMatchHistory ( long playerId , String [ ] championIds , QueueType ... queueTypes ) { return new ApiFuture < > ( ( ) -> handler . getMatchHistory ( playerId , championIds , queueTypes ) ) ; }
Retrieve a player s match history filtering out all games not in the specified queues .
141,046
public Future < RankedStats > getRankedStats ( long summoner , Season season ) { return new ApiFuture < > ( ( ) -> handler . getRankedStats ( summoner , season ) ) ; }
Get ranked stats for a player in a specific season
141,047
public Future < List < PlayerStats > > getStatsSummary ( long summoner , Season season ) { return new ApiFuture < > ( ( ) -> handler . getStatsSummary ( summoner , season ) ) ; }
Get player stats for the player
141,048
public Future < Map < String , Summoner > > getSummoners ( String ... names ) { return new ApiFuture < > ( ( ) -> handler . getSummoners ( names ) ) ; }
Get summoner information for the summoners with the specified names
141,049
public Future < Map < Integer , Summoner > > getSummoners ( Integer ... ids ) { return new ApiFuture < > ( ( ) -> handler . getSummoners ( ids ) ) ; }
Get summoner information for the summoners with the specified ids
141,050
public Future < Map < Integer , Set < MasteryPage > > > getMasteryPagesMultipleUsers ( Integer ... ids ) { return new ApiFuture < > ( ( ) -> handler . getMasteryPagesMultipleUsers ( ids ) ) ; }
Retrieve mastery pages for multiple users
141,051
public Future < Map < Integer , String > > getSummonerNames ( Integer ... ids ) { return new ApiFuture < > ( ( ) -> handler . getSummonerNames ( ids ) ) ; }
Retrieve summoner names for the specified ids
141,052
public Future < Map < Integer , Set < RunePage > > > getRunePagesMultipleUsers ( int ... ids ) { return new ApiFuture < > ( ( ) -> handler . getRunePagesMultipleUsers ( ids ) ) ; }
Retrieve runes pages for multiple users
141,053
public Future < Map < Long , List < RankedTeam > > > getTeams ( long ... ids ) { return new ApiFuture < > ( ( ) -> handler . getTeamsBySummoners ( ids ) ) ; }
Retrieve the ranked teams of the specified users
141,054
public Future < Map < String , RankedTeam > > getTeams ( String ... teamIds ) { return new ApiFuture < > ( ( ) -> handler . getTeams ( teamIds ) ) ; }
Retrieve information for the specified ranked teams
141,055
public Future < List < Long > > getSummonerIds ( String ... names ) { return new ApiFuture < > ( ( ) -> handler . getSummonerIds ( names ) ) ; }
Retrieve summoner ids for the specified names
141,056
public static ThrottledApiHandler developmentDefault ( Shard shard , String token ) { return new ThrottledApiHandler ( shard , token , new Limit ( 10 , 10 , TimeUnit . SECONDS ) , new Limit ( 500 , 10 , TimeUnit . MINUTES ) ) ; }
Returns a throttled api handler with the current development request limits which is 10 requests per 10 seconds and 500 requests per 10 minutes
141,057
public void updateRecord ( final ORecordInternal < ? > record ) { if ( isEnabled ( ) && record . getIdentity ( ) . getClusterId ( ) != excludedCluster && record . getIdentity ( ) . isValid ( ) ) { underlying . lock ( record . getIdentity ( ) ) ; try { if ( underlying . get ( record . getIdentity ( ) ) != record ) under...
Pushes record to cache . Identifier of record used as access key
141,058
public ORecordInternal < ? > findRecord ( final ORID rid ) { if ( ! isEnabled ( ) ) return null ; ORecordInternal < ? > record ; underlying . lock ( rid ) ; try { record = underlying . get ( rid ) ; if ( record == null ) { record = secondary . retrieveRecord ( rid ) ; if ( record != null ) underlying . put ( record ) ;...
Looks up for record in cache by it s identifier . Optionally look up in secondary cache and update primary with found record
141,059
@ SuppressWarnings ( "rawtypes" ) public Object execute ( final Map < Object , Object > iArgs ) { if ( indexName == null ) throw new OCommandExecutionException ( "Cannot execute the command because it has not been parsed yet" ) ; final ODatabaseRecord database = getDatabase ( ) ; final OIndex < ? > idx ; if ( fields ==...
Execute the CREATE INDEX .
141,060
public Team createTeam ( String name , String tag ) { return client . sendRpcAndWait ( SERVICE , "createTeam" , name , tag ) ; }
Create a new ranked team with the specified name and tag
141,061
public Team invitePlayer ( long summonerId , TeamId teamId ) { return client . sendRpcAndWait ( SERVICE , "invitePlayer" , summonerId , teamId ) ; }
Invite a player to the target team
141,062
public Team kickPlayer ( long summonerId , TeamId teamId ) { return client . sendRpcAndWait ( SERVICE , "kickPlayer" , summonerId , teamId ) ; }
Kick a player from the target team
141,063
static AnalysisResult analyse ( Class < ? > klass , Constructor < ? > constructor ) throws IOException { Class < ? > [ ] parameterTypes = constructor . getParameterTypes ( ) ; InputStream in = klass . getResourceAsStream ( "/" + klass . getName ( ) . replace ( '.' , '/' ) + ".class" ) ; if ( in == null ) { throw new Il...
Produces an assignment or field names to values or fails .
141,064
public String marshal ( ZonedDateTime zonedDateTime ) { if ( null == zonedDateTime ) { return null ; } return zonedDateTime . withZoneSameInstant ( ZoneOffset . UTC ) . format ( formatter ) ; }
When marshalling the provided zonedDateTime is normalized to UTC so that the output is consistent between dates and time zones .
141,065
public static boolean isValid ( String sentence ) { try { return sentence . substring ( sentence . lastIndexOf ( "*" ) + 1 ) . equalsIgnoreCase ( getChecksum ( sentence ) ) ; } catch ( AisParseException e ) { return false ; } }
Returns true if and only if the sentence s checksum matches the calculated checksum .
141,066
private static Properties getEnvironmentFile ( File configFile ) { Properties mergedProperties = new Properties ( ) ; InputStream inputStream ; try { inputStream = new FileInputStream ( configFile ) ; } catch ( FileNotFoundException e ) { return mergedProperties ; } try { mergedProperties . load ( inputStream ) ; input...
Leser properties fra classpath og vil overlaste i reverse order slik at classpath reverse order styrer hvilke props som gjelder .
141,067
private static OIndexSearchResult createIndexedProperty ( final OSQLFilterCondition iCondition , final Object iItem ) { if ( iItem == null || ! ( iItem instanceof OSQLFilterItemField ) ) return null ; if ( iCondition . getLeft ( ) instanceof OSQLFilterItemField && iCondition . getRight ( ) instanceof OSQLFilterItemFiel...
Add SQL filter field to the search candidate list .
141,068
void addResult ( String valueData , String detailData ) { if ( value ) { if ( valueData == null ) throw new IllegalArgumentException ( CLASS + ": valueData may not be null" ) ; values . add ( valueData ) ; if ( detail ) { if ( detailData == null ) throw new IllegalArgumentException ( CLASS + ": detailData may not be nu...
Store the data for a match found
141,069
public String marshal ( Object jaxbObject ) { if ( jaxbContext == null ) { logger . error ( "Trying to marshal with a null jaxbContext, returns null. Check your configuration, e.g. jaxb-transformers!" ) ; return null ; } try { StringWriter writer = new StringWriter ( ) ; Marshaller marshaller = jaxbContext . createMars...
Marshal a JAXB object to a XML - string
141,070
static boolean isPghp ( String line ) { if ( line == null ) return false ; else return pghpPattern . matcher ( line ) . matches ( ) ; }
Returns true if and only if the given NMEA line is a PGHP line . Remember that the line can start with a tag block .
141,071
public static boolean isExactEarthTimestamp ( String line ) { try { new NmeaMessageExactEarthTimestamp ( line ) ; return true ; } catch ( AisParseException e ) { return false ; } catch ( NmeaMessageParseException e ) { return false ; } }
Returns true if the given line is a custom ExactEarth timestamp .
141,072
private static long getTime ( int year , int month , int day , int hour , int minute , int second , int millisecond ) { Calendar cal = Calendar . getInstance ( Util . TIME_ZONE_UTC ) ; cal . set ( year , month - 1 , day , hour , minute , second ) ; cal . set ( Calendar . MILLISECOND , millisecond ) ; return cal . getTi...
Returns the epoch time in ms .
141,073
private String getFolderAndCreateIfMissing ( String inFolder ) { String folder = outputFolder ; if ( inFolder != null ) { folder += "/" + inFolder ; } mkdirs ( folder ) ; return folder ; }
Computes foldername and creates the folders that does not already exist
141,074
public static EventBus get ( ) { if ( EventBus . instance == null ) { EventBus . instance = new EventBus ( ) ; } return EventBus . instance ; }
Get the singleton .
141,075
public ORecordIteratorClusters < REC > last ( ) { currentClusterIdx = clusterIds . length - 1 ; current . clusterPosition = liveUpdated ? database . countClusterElements ( clusterIds [ currentClusterIdx ] ) : lastClusterPosition + 1 ; return this ; }
Move the iterator to the end of the range . If no range was specified move to the last record of the cluster .
141,076
private static OIdentifiable linkToStream ( final StringBuilder buffer , final ORecordSchemaAware < ? > iParentRecord , Object iLinked ) { if ( iLinked == null ) return null ; OIdentifiable resultRid = null ; ORID rid ; final ODatabaseRecord database = ODatabaseRecordThreadLocal . INSTANCE . get ( ) ; if ( iLinked inst...
Serialize the link .
141,077
public ODocument toStream ( ) { acquireExclusiveLock ( ) ; try { document . setInternalStatus ( ORecordElement . STATUS . UNMARSHALLING ) ; try { final ORecordTrackedSet idxs = new ORecordTrackedSet ( document ) ; for ( final OIndexInternal < ? > i : indexes . values ( ) ) { idxs . add ( i . updateConfiguration ( ) ) ;...
Binds POJO to ODocument .
141,078
private void releaseCallbacks ( Exception ex ) { synchronized ( callbacks ) { for ( Map . Entry < Integer , InvokeCallback > cb : callbacks . entrySet ( ) ) { cb . getValue ( ) . release ( ex ) ; } } }
Release waiting threads if we fail for some reason
141,079
synchronized void line ( String line , long arrivalTime ) { if ( count . incrementAndGet ( ) % logCountFrequency == 0 ) log . info ( "count=" + count . get ( ) + ",buffer size=" + lines . size ( ) ) ; NmeaMessage nmea ; try { nmea = NmeaUtil . parseNmea ( line ) ; } catch ( NmeaMessageParseException e ) { listener . in...
Handles the arrival of a new NMEA line at the given arrival time .
141,080
private Set < Integer > findExpiredIndexesBeforeIndex ( int index ) { long indexTime = getLineTime ( index ) ; Set < Integer > removeThese = Sets . newHashSet ( ) ; for ( int i = index - 1 ; i >= 0 ; i -- ) { if ( indexTime - getLineTime ( i ) > MAXIMUM_ARRIVAL_TIME_DIFFERENCE_MS ) { listener . timestampNotFound ( getL...
Returns the list of those indexes that can be removed from the buffer because they have a timestamp more than MAXIMUM_ARRIVAL_TIME_DIFFERENCE_MS from the arrival time of the given index .
141,081
private Set < Integer > matchWithClosestAisMessageIfBufferLargeEnough ( long arrivalTime , Integer earliestTimestampLineIndex ) { String timestampLine = getLine ( earliestTimestampLineIndex ) ; long time = getLineTime ( earliestTimestampLineIndex ) ; log . debug ( "ts=" + timestampLine + ",time=" + time ) ; Set < Integ...
Finds matches and reports them to the listeners if buffer has a sufficent span of time in it . Returns the indexes that should be removed from the buffer .
141,082
private Set < Integer > reportMatchAndFindIndexesToRemove ( Integer earliestTimestampLineIndex , NmeaMessageExactEarthTimestamp timestamp , Integer lowestTimeDiffIndex ) { String msg = getLine ( lowestTimeDiffIndex ) ; log . debug ( "found matching msg=" + msg ) ; listener . message ( msg , timestamp . getTime ( ) ) ; ...
Reports a found match and returns the indexes that can be removed from the buffer .
141,083
public static MimeMessage createMimeMessage ( Session session , String from , String [ ] to , String subject , String content , DataSource [ ] attachments ) { logger . debug ( "Creates a mime message with {} attachments" , ( attachments == null ) ? 0 : attachments . length ) ; try { MimeMessage message = new MimeMessag...
Creates a mime - message multipart if attachements are supplied otherwise as plain text . Assumes UTF - 8 encoding for both subject and content .
141,084
public static void disableTlsServerCertificateCheck ( Client client ) { if ( ! ( client . getConduit ( ) instanceof HTTPConduit ) ) { log . warn ( "Conduit not of type HTTPConduit (" + client . getConduit ( ) . getClass ( ) . getName ( ) + ") , skip disabling server certification validation." ) ; return ; } log . warn ...
Disables validation of https server certificates only to be used during development and tests!!!
141,085
public boolean isRuleDefined ( final String iResource ) { for ( ORole r : roles ) if ( r . hasRule ( iResource ) ) return true ; return false ; }
Checks if a rule was defined for the user .
141,086
public Object execute ( final Map < Object , Object > iArgs ) { if ( attribute == null ) throw new OCommandExecutionException ( "Cannot execute the command because it has not yet been parsed" ) ; final OClassImpl sourceClass = ( OClassImpl ) getDatabase ( ) . getMetadata ( ) . getSchema ( ) . getClass ( className ) ; i...
Execute the ALTER PROPERTY .
141,087
public void flush ( ) { lock . writeLock ( ) . lock ( ) ; try { OMMapBufferEntry entry ; for ( Iterator < OMMapBufferEntry > it = bufferPoolLRU . iterator ( ) ; it . hasNext ( ) ; ) { entry = it . next ( ) ; if ( entry . file != null && entry . file . isClosed ( ) ) { if ( removeEntry ( entry ) ) it . remove ( ) ; } } ...
Flushes away all the buffers of closed files . This frees the memory .
141,088
public void flushFile ( final OFileMMap iFile ) { lock . readLock ( ) . lock ( ) ; try { final List < OMMapBufferEntry > entries = bufferPoolPerFile . get ( iFile ) ; if ( entries != null ) for ( OMMapBufferEntry entry : entries ) entry . flush ( ) ; } finally { lock . readLock ( ) . unlock ( ) ; } }
Flushes all the buffers of the passed file .
141,089
private static int searchEntry ( final List < OMMapBufferEntry > fileEntries , final long iBeginOffset , final int iSize ) { if ( fileEntries == null || fileEntries . size ( ) == 0 ) return - 1 ; int high = fileEntries . size ( ) - 1 ; if ( high < 0 ) return - 1 ; int low = 0 ; int mid = - 1 ; OMMapBufferEntry e ; whil...
Search for a buffer in the ordered list .
141,090
public static Observable < Fix > from ( File file , boolean backpressure , BinaryFixesFormat format ) { if ( backpressure ) return BinaryFixesOnSubscribeWithBackp . from ( file , format ) ; else return BinaryFixesOnSubscribeFastPath . from ( file , format ) ; }
Automatically detects gzip based on filename .
141,091
public void encodeAmf3 ( Object obj , Amf3Type marker ) throws IOException { out . write ( marker . ordinal ( ) ) ; if ( marker == Amf3Type . NULL ) { return ; } serializeAmf3 ( obj , marker ) ; }
Encodes an object in amf3 as an object of the specified type
141,092
@ SneakyThrows ( value = { InstantiationException . class , IllegalAccessException . class } ) public void serializeAmf3 ( Object obj , Amf3Type marker ) throws IOException { if ( checkReferenceable ( obj , marker ) ) { return ; } Serialization context ; if ( amf3Serializers . containsKey ( obj . getClass ( ) ) ) { amf...
Serializes the specified object to amf3
141,093
public Object evaluateRecord ( final OIdentifiable iRecord , final OSQLFilterCondition iCondition , final Object iLeft , final Object iRight , OCommandContext iContext ) { return true ; }
At run - time the evaluation per record must return always true since the recordset are filtered at the begin .
141,094
public Object execute ( final Map < Object , Object > iArgs ) { if ( name == null ) throw new OCommandExecutionException ( "Cannot execute the command because it has not been parsed yet" ) ; getDatabase ( ) . getMetadata ( ) . getIndexManager ( ) . dropIndex ( name ) ; return null ; }
Execute the REMOVE INDEX .
141,095
public void close ( ) { for ( Entry < String , OResourcePool < String , CH > > pool : pools . entrySet ( ) ) { for ( CH channel : pool . getValue ( ) . getResources ( ) ) { channel . close ( ) ; } } }
Closes all the channels .
141,096
public PlayerLifetimeStats retrievePlayerStatsByAccountId ( long accountId , Season season ) { return client . sendRpcAndWait ( SERVICE , "retrievePlayerStatsByAccountId" , accountId , season ) ; }
Retrieve player stats
141,097
public List < ChampionStatInfo > retrieveTopPlayedChampions ( long accId , GameMode mode ) { return client . sendRpcAndWait ( SERVICE , "retrieveTopPlayedChampions" , accId , mode ) ; }
Retrieve the most played champions for the target player
141,098
public AggregatedStats getAggregatedStats ( long id , GameMode gameMode , Season season ) { return client . sendRpcAndWait ( SERVICE , "getAggregatedStats" , id , gameMode , season . numeric ) ; }
Retrieve a player s stats
141,099
public EndOfGameStats getTeamEndOfGameStats ( TeamId teamId , long gameId ) { return client . sendRpcAndWait ( SERVICE , "getTeamEndOfGameStats" , teamId , gameId ) ; }
Retrieve post - game stats for a team