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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
160,700 | hibernate/hibernate-ogm | neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java | EmbeddedNeo4jEntityQueries.findEntities | public ResourceIterator<Node> findEntities(GraphDatabaseService executionEngine) {
Result result = executionEngine.execute( getFindEntitiesQuery() );
return result.columnAs( BaseNeo4jEntityQueries.ENTITY_ALIAS );
} | java | public ResourceIterator<Node> findEntities(GraphDatabaseService executionEngine) {
Result result = executionEngine.execute( getFindEntitiesQuery() );
return result.columnAs( BaseNeo4jEntityQueries.ENTITY_ALIAS );
} | [
"public",
"ResourceIterator",
"<",
"Node",
">",
"findEntities",
"(",
"GraphDatabaseService",
"executionEngine",
")",
"{",
"Result",
"result",
"=",
"executionEngine",
".",
"execute",
"(",
"getFindEntitiesQuery",
"(",
")",
")",
";",
"return",
"result",
".",
"columnA... | Find all the node representing the entity.
@param executionEngine the {@link GraphDatabaseService} used to run the query
@return an iterator over the nodes representing an entity | [
"Find",
"all",
"the",
"node",
"representing",
"the",
"entity",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java#L143-L146 |
160,701 | hibernate/hibernate-ogm | neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java | EmbeddedNeo4jEntityQueries.removeEntity | public void removeEntity(GraphDatabaseService executionEngine, Object[] columnValues) {
Map<String, Object> params = params( columnValues );
executionEngine.execute( getRemoveEntityQuery(), params );
} | java | public void removeEntity(GraphDatabaseService executionEngine, Object[] columnValues) {
Map<String, Object> params = params( columnValues );
executionEngine.execute( getRemoveEntityQuery(), params );
} | [
"public",
"void",
"removeEntity",
"(",
"GraphDatabaseService",
"executionEngine",
",",
"Object",
"[",
"]",
"columnValues",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"params",
"(",
"columnValues",
")",
";",
"executionEngine",
".",
"exec... | Remove the nodes representing the entity and the embedded elements attached to it.
@param executionEngine the {@link GraphDatabaseService} used to run the query
@param columnValues the values of the key identifying the entity to remove | [
"Remove",
"the",
"nodes",
"representing",
"the",
"entity",
"and",
"the",
"embedded",
"elements",
"attached",
"to",
"it",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java#L154-L157 |
160,702 | hibernate/hibernate-ogm | neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java | EmbeddedNeo4jEntityQueries.updateEmbeddedColumn | public void updateEmbeddedColumn(GraphDatabaseService executionEngine, Object[] keyValues, String embeddedColumn, Object value) {
String query = getUpdateEmbeddedColumnQuery( keyValues, embeddedColumn );
Map<String, Object> params = params( ArrayHelper.concat( keyValues, value, value ) );
executionEngine.execute(... | java | public void updateEmbeddedColumn(GraphDatabaseService executionEngine, Object[] keyValues, String embeddedColumn, Object value) {
String query = getUpdateEmbeddedColumnQuery( keyValues, embeddedColumn );
Map<String, Object> params = params( ArrayHelper.concat( keyValues, value, value ) );
executionEngine.execute(... | [
"public",
"void",
"updateEmbeddedColumn",
"(",
"GraphDatabaseService",
"executionEngine",
",",
"Object",
"[",
"]",
"keyValues",
",",
"String",
"embeddedColumn",
",",
"Object",
"value",
")",
"{",
"String",
"query",
"=",
"getUpdateEmbeddedColumnQuery",
"(",
"keyValues",... | Update the value of an embedded node property.
@param executionEngine the {@link GraphDatabaseService} used to run the query
@param keyValues the columns representing the identifier in the entity owning the embedded
@param embeddedColumn the column on the embedded node (dot-separated properties)
@param value the new v... | [
"Update",
"the",
"value",
"of",
"an",
"embedded",
"node",
"property",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java#L167-L171 |
160,703 | hibernate/hibernate-ogm | mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/index/impl/MongoDBIndexSpec.java | MongoDBIndexSpec.prepareOptions | private static IndexOptions prepareOptions(MongoDBIndexType indexType, Document options, String indexName, boolean unique) {
IndexOptions indexOptions = new IndexOptions();
indexOptions.name( indexName ).unique( unique ).background( options.getBoolean( "background" , false ) );
if ( unique ) {
// MongoDB only... | java | private static IndexOptions prepareOptions(MongoDBIndexType indexType, Document options, String indexName, boolean unique) {
IndexOptions indexOptions = new IndexOptions();
indexOptions.name( indexName ).unique( unique ).background( options.getBoolean( "background" , false ) );
if ( unique ) {
// MongoDB only... | [
"private",
"static",
"IndexOptions",
"prepareOptions",
"(",
"MongoDBIndexType",
"indexType",
",",
"Document",
"options",
",",
"String",
"indexName",
",",
"boolean",
"unique",
")",
"{",
"IndexOptions",
"indexOptions",
"=",
"new",
"IndexOptions",
"(",
")",
";",
"ind... | Prepare the options by adding additional information to them.
@see <a href="https://docs.mongodb.com/manual/core/index-ttl/">TTL Indexes</a> | [
"Prepare",
"the",
"options",
"by",
"adding",
"additional",
"information",
"to",
"them",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/index/impl/MongoDBIndexSpec.java#L112-L146 |
160,704 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/BiDirectionalAssociationHelper.java | BiDirectionalAssociationHelper.getInverseAssociationKeyMetadata | public static AssociationKeyMetadata getInverseAssociationKeyMetadata(OgmEntityPersister mainSidePersister, int propertyIndex) {
Type propertyType = mainSidePersister.getPropertyTypes()[propertyIndex];
SessionFactoryImplementor factory = mainSidePersister.getFactory();
// property represents no association, so n... | java | public static AssociationKeyMetadata getInverseAssociationKeyMetadata(OgmEntityPersister mainSidePersister, int propertyIndex) {
Type propertyType = mainSidePersister.getPropertyTypes()[propertyIndex];
SessionFactoryImplementor factory = mainSidePersister.getFactory();
// property represents no association, so n... | [
"public",
"static",
"AssociationKeyMetadata",
"getInverseAssociationKeyMetadata",
"(",
"OgmEntityPersister",
"mainSidePersister",
",",
"int",
"propertyIndex",
")",
"{",
"Type",
"propertyType",
"=",
"mainSidePersister",
".",
"getPropertyTypes",
"(",
")",
"[",
"propertyIndex"... | Returns the meta-data for the inverse side of the association represented by the given property on the given
persister in case it represents the main side of a bi-directional one-to-many or many-to-many association.
@param mainSidePersister persister of the entity hosting the property of interest
@param propertyIndex ... | [
"Returns",
"the",
"meta",
"-",
"data",
"for",
"the",
"inverse",
"side",
"of",
"the",
"association",
"represented",
"by",
"the",
"given",
"property",
"on",
"the",
"given",
"persister",
"in",
"case",
"it",
"represents",
"the",
"main",
"side",
"of",
"a",
"bi"... | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/BiDirectionalAssociationHelper.java#L41-L89 |
160,705 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/BiDirectionalAssociationHelper.java | BiDirectionalAssociationHelper.getInverseCollectionPersister | public static OgmCollectionPersister getInverseCollectionPersister(OgmCollectionPersister mainSidePersister) {
if ( mainSidePersister.isInverse() || !mainSidePersister.isManyToMany() || !mainSidePersister.getElementType().isEntityType() ) {
return null;
}
EntityPersister inverseSidePersister = mainSidePersist... | java | public static OgmCollectionPersister getInverseCollectionPersister(OgmCollectionPersister mainSidePersister) {
if ( mainSidePersister.isInverse() || !mainSidePersister.isManyToMany() || !mainSidePersister.getElementType().isEntityType() ) {
return null;
}
EntityPersister inverseSidePersister = mainSidePersist... | [
"public",
"static",
"OgmCollectionPersister",
"getInverseCollectionPersister",
"(",
"OgmCollectionPersister",
"mainSidePersister",
")",
"{",
"if",
"(",
"mainSidePersister",
".",
"isInverse",
"(",
")",
"||",
"!",
"mainSidePersister",
".",
"isManyToMany",
"(",
")",
"||",
... | Returns the given collection persister for the inverse side in case the given persister represents the main side
of a bi-directional many-to-many association.
@param mainSidePersister the collection persister on the main side of a bi-directional many-to-many association
@return the collection persister for the inverse... | [
"Returns",
"the",
"given",
"collection",
"persister",
"for",
"the",
"inverse",
"side",
"in",
"case",
"the",
"given",
"persister",
"represents",
"the",
"main",
"side",
"of",
"a",
"bi",
"-",
"directional",
"many",
"-",
"to",
"-",
"many",
"association",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/BiDirectionalAssociationHelper.java#L99-L117 |
160,706 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/BiDirectionalAssociationHelper.java | BiDirectionalAssociationHelper.isCollectionMatching | private static boolean isCollectionMatching(Joinable mainSideJoinable, OgmCollectionPersister inverseSidePersister) {
boolean isSameTable = mainSideJoinable.getTableName().equals( inverseSidePersister.getTableName() );
if ( !isSameTable ) {
return false;
}
return Arrays.equals( mainSideJoinable.getKeyColum... | java | private static boolean isCollectionMatching(Joinable mainSideJoinable, OgmCollectionPersister inverseSidePersister) {
boolean isSameTable = mainSideJoinable.getTableName().equals( inverseSidePersister.getTableName() );
if ( !isSameTable ) {
return false;
}
return Arrays.equals( mainSideJoinable.getKeyColum... | [
"private",
"static",
"boolean",
"isCollectionMatching",
"(",
"Joinable",
"mainSideJoinable",
",",
"OgmCollectionPersister",
"inverseSidePersister",
")",
"{",
"boolean",
"isSameTable",
"=",
"mainSideJoinable",
".",
"getTableName",
"(",
")",
".",
"equals",
"(",
"inverseSi... | Checks whether table name and key column names of the given joinable and inverse collection persister match. | [
"Checks",
"whether",
"table",
"name",
"and",
"key",
"column",
"names",
"of",
"the",
"given",
"joinable",
"and",
"inverse",
"collection",
"persister",
"match",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/BiDirectionalAssociationHelper.java#L160-L168 |
160,707 | hibernate/hibernate-ogm | mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/dialect/impl/MongoHelpers.java | MongoHelpers.resetValue | public static void resetValue(Document entity, String column) {
// fast path for non-embedded case
if ( !column.contains( "." ) ) {
entity.remove( column );
}
else {
String[] path = DOT_SEPARATOR_PATTERN.split( column );
Object field = entity;
int size = path.length;
for ( int index = 0; index < ... | java | public static void resetValue(Document entity, String column) {
// fast path for non-embedded case
if ( !column.contains( "." ) ) {
entity.remove( column );
}
else {
String[] path = DOT_SEPARATOR_PATTERN.split( column );
Object field = entity;
int size = path.length;
for ( int index = 0; index < ... | [
"public",
"static",
"void",
"resetValue",
"(",
"Document",
"entity",
",",
"String",
"column",
")",
"{",
"// fast path for non-embedded case",
"if",
"(",
"!",
"column",
".",
"contains",
"(",
"\".\"",
")",
")",
"{",
"entity",
".",
"remove",
"(",
"column",
")",... | Remove a column from the Document
@param entity the {@link Document} with the column
@param column the column to remove | [
"Remove",
"a",
"column",
"from",
"the",
"Document"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/dialect/impl/MongoHelpers.java#L56-L79 |
160,708 | hibernate/hibernate-ogm | mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/impl/MongoDBSchemaDefiner.java | MongoDBSchemaDefiner.validateAsMongoDBCollectionName | private static void validateAsMongoDBCollectionName(String collectionName) {
Contracts.assertStringParameterNotEmpty( collectionName, "requestedName" );
//Yes it has some strange requirements.
if ( collectionName.startsWith( "system." ) ) {
throw log.collectionNameHasInvalidSystemPrefix( collectionName );
}
... | java | private static void validateAsMongoDBCollectionName(String collectionName) {
Contracts.assertStringParameterNotEmpty( collectionName, "requestedName" );
//Yes it has some strange requirements.
if ( collectionName.startsWith( "system." ) ) {
throw log.collectionNameHasInvalidSystemPrefix( collectionName );
}
... | [
"private",
"static",
"void",
"validateAsMongoDBCollectionName",
"(",
"String",
"collectionName",
")",
"{",
"Contracts",
".",
"assertStringParameterNotEmpty",
"(",
"collectionName",
",",
"\"requestedName\"",
")",
";",
"//Yes it has some strange requirements.",
"if",
"(",
"co... | Validates a String to be a valid name to be used in MongoDB for a collection name.
@param collectionName | [
"Validates",
"a",
"String",
"to",
"be",
"a",
"valid",
"name",
"to",
"be",
"used",
"in",
"MongoDB",
"for",
"a",
"collection",
"name",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/impl/MongoDBSchemaDefiner.java#L360-L372 |
160,709 | hibernate/hibernate-ogm | mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/impl/MongoDBSchemaDefiner.java | MongoDBSchemaDefiner.validateAsMongoDBFieldName | private void validateAsMongoDBFieldName(String fieldName) {
if ( fieldName.startsWith( "$" ) ) {
throw log.fieldNameHasInvalidDollarPrefix( fieldName );
}
else if ( fieldName.contains( "\u0000" ) ) {
throw log.fieldNameContainsNULCharacter( fieldName );
}
} | java | private void validateAsMongoDBFieldName(String fieldName) {
if ( fieldName.startsWith( "$" ) ) {
throw log.fieldNameHasInvalidDollarPrefix( fieldName );
}
else if ( fieldName.contains( "\u0000" ) ) {
throw log.fieldNameContainsNULCharacter( fieldName );
}
} | [
"private",
"void",
"validateAsMongoDBFieldName",
"(",
"String",
"fieldName",
")",
"{",
"if",
"(",
"fieldName",
".",
"startsWith",
"(",
"\"$\"",
")",
")",
"{",
"throw",
"log",
".",
"fieldNameHasInvalidDollarPrefix",
"(",
"fieldName",
")",
";",
"}",
"else",
"if"... | Validates a String to be a valid name to be used in MongoDB for a field name.
@param fieldName | [
"Validates",
"a",
"String",
"to",
"be",
"a",
"valid",
"name",
"to",
"be",
"used",
"in",
"MongoDB",
"for",
"a",
"field",
"name",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/impl/MongoDBSchemaDefiner.java#L379-L386 |
160,710 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.determineBatchSize | private static int determineBatchSize(boolean canGridDialectDoMultiget, int classBatchSize, int configuredDefaultBatchSize) {
// if the dialect does not support it, don't batch so that we can avoid skewing the ORM fetch statistics
if ( !canGridDialectDoMultiget ) {
return -1;
}
else if ( classBatchSize != -1... | java | private static int determineBatchSize(boolean canGridDialectDoMultiget, int classBatchSize, int configuredDefaultBatchSize) {
// if the dialect does not support it, don't batch so that we can avoid skewing the ORM fetch statistics
if ( !canGridDialectDoMultiget ) {
return -1;
}
else if ( classBatchSize != -1... | [
"private",
"static",
"int",
"determineBatchSize",
"(",
"boolean",
"canGridDialectDoMultiget",
",",
"int",
"classBatchSize",
",",
"int",
"configuredDefaultBatchSize",
")",
"{",
"// if the dialect does not support it, don't batch so that we can avoid skewing the ORM fetch statistics",
... | Returns the effective batch size. If the dialect is multiget capable and a batch size has been configured, use
that one, otherwise the default. | [
"Returns",
"the",
"effective",
"batch",
"size",
".",
"If",
"the",
"dialect",
"is",
"multiget",
"capable",
"and",
"a",
"batch",
"size",
"has",
"been",
"configured",
"use",
"that",
"one",
"otherwise",
"the",
"default",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L354-L368 |
160,711 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.getInverseOneToOneProperty | private String getInverseOneToOneProperty(String property, OgmEntityPersister otherSidePersister) {
for ( String candidate : otherSidePersister.getPropertyNames() ) {
Type candidateType = otherSidePersister.getPropertyType( candidate );
if ( candidateType.isEntityType()
&& ( ( (EntityType) candidateType ).... | java | private String getInverseOneToOneProperty(String property, OgmEntityPersister otherSidePersister) {
for ( String candidate : otherSidePersister.getPropertyNames() ) {
Type candidateType = otherSidePersister.getPropertyType( candidate );
if ( candidateType.isEntityType()
&& ( ( (EntityType) candidateType ).... | [
"private",
"String",
"getInverseOneToOneProperty",
"(",
"String",
"property",
",",
"OgmEntityPersister",
"otherSidePersister",
")",
"{",
"for",
"(",
"String",
"candidate",
":",
"otherSidePersister",
".",
"getPropertyNames",
"(",
")",
")",
"{",
"Type",
"candidateType",... | Returns the name from the inverse side if the given property de-notes a one-to-one association. | [
"Returns",
"the",
"name",
"from",
"the",
"inverse",
"side",
"if",
"the",
"given",
"property",
"de",
"-",
"notes",
"a",
"one",
"-",
"to",
"-",
"one",
"association",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L415-L426 |
160,712 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.getDatabaseSnapshot | @Override
public Object[] getDatabaseSnapshot(Serializable id, SharedSessionContractImplementor session)
throws HibernateException {
if ( log.isTraceEnabled() ) {
log.trace( "Getting current persistent state for: " + MessageHelper.infoString( this, id, getFactory() ) );
}
//snapshot is a Map in the end
... | java | @Override
public Object[] getDatabaseSnapshot(Serializable id, SharedSessionContractImplementor session)
throws HibernateException {
if ( log.isTraceEnabled() ) {
log.trace( "Getting current persistent state for: " + MessageHelper.infoString( this, id, getFactory() ) );
}
//snapshot is a Map in the end
... | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"getDatabaseSnapshot",
"(",
"Serializable",
"id",
",",
"SharedSessionContractImplementor",
"session",
")",
"throws",
"HibernateException",
"{",
"if",
"(",
"log",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
"log",
"."... | This snapshot is meant to be used when updating data. | [
"This",
"snapshot",
"is",
"meant",
"to",
"be",
"used",
"when",
"updating",
"data",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L644-L669 |
160,713 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.initializeLazyPropertiesFromCache | private Object initializeLazyPropertiesFromCache(
final String fieldName,
final Object entity,
final SharedSessionContractImplementor session,
final EntityEntry entry,
final CacheEntry cacheEntry
) {
throw new NotSupportedException( "OGM-9", "Lazy properties not supported in OGM" );
} | java | private Object initializeLazyPropertiesFromCache(
final String fieldName,
final Object entity,
final SharedSessionContractImplementor session,
final EntityEntry entry,
final CacheEntry cacheEntry
) {
throw new NotSupportedException( "OGM-9", "Lazy properties not supported in OGM" );
} | [
"private",
"Object",
"initializeLazyPropertiesFromCache",
"(",
"final",
"String",
"fieldName",
",",
"final",
"Object",
"entity",
",",
"final",
"SharedSessionContractImplementor",
"session",
",",
"final",
"EntityEntry",
"entry",
",",
"final",
"CacheEntry",
"cacheEntry",
... | Make superclasses method protected?? | [
"Make",
"superclasses",
"method",
"protected??"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L708-L716 |
160,714 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.getCurrentVersion | @Override
public Object getCurrentVersion(Serializable id, SharedSessionContractImplementor session) throws HibernateException {
if ( log.isTraceEnabled() ) {
log.trace( "Getting version: " + MessageHelper.infoString( this, id, getFactory() ) );
}
final Tuple resultset = getFreshTuple( EntityKeyBuilder.fromP... | java | @Override
public Object getCurrentVersion(Serializable id, SharedSessionContractImplementor session) throws HibernateException {
if ( log.isTraceEnabled() ) {
log.trace( "Getting version: " + MessageHelper.infoString( this, id, getFactory() ) );
}
final Tuple resultset = getFreshTuple( EntityKeyBuilder.fromP... | [
"@",
"Override",
"public",
"Object",
"getCurrentVersion",
"(",
"Serializable",
"id",
",",
"SharedSessionContractImplementor",
"session",
")",
"throws",
"HibernateException",
"{",
"if",
"(",
"log",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
"log",
".",
"trace",
"... | Retrieve the version number | [
"Retrieve",
"the",
"version",
"number"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L730-L744 |
160,715 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.isAllOrDirtyOptLocking | private boolean isAllOrDirtyOptLocking() {
EntityMetamodel entityMetamodel = getEntityMetamodel();
return entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.DIRTY
|| entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.ALL;
} | java | private boolean isAllOrDirtyOptLocking() {
EntityMetamodel entityMetamodel = getEntityMetamodel();
return entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.DIRTY
|| entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.ALL;
} | [
"private",
"boolean",
"isAllOrDirtyOptLocking",
"(",
")",
"{",
"EntityMetamodel",
"entityMetamodel",
"=",
"getEntityMetamodel",
"(",
")",
";",
"return",
"entityMetamodel",
".",
"getOptimisticLockStyle",
"(",
")",
"==",
"OptimisticLockStyle",
".",
"DIRTY",
"||",
"entit... | Copied from AbstractEntityPersister | [
"Copied",
"from",
"AbstractEntityPersister"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L1296-L1300 |
160,716 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.removeFromInverseAssociations | private void removeFromInverseAssociations(
Tuple resultset,
int tableIndex,
Serializable id,
SharedSessionContractImplementor session) {
new EntityAssociationUpdater( this )
.id( id )
.resultset( resultset )
.session( session )
.tableIndex( tableIndex )
.propertyMightRequireInverseAss... | java | private void removeFromInverseAssociations(
Tuple resultset,
int tableIndex,
Serializable id,
SharedSessionContractImplementor session) {
new EntityAssociationUpdater( this )
.id( id )
.resultset( resultset )
.session( session )
.tableIndex( tableIndex )
.propertyMightRequireInverseAss... | [
"private",
"void",
"removeFromInverseAssociations",
"(",
"Tuple",
"resultset",
",",
"int",
"tableIndex",
",",
"Serializable",
"id",
",",
"SharedSessionContractImplementor",
"session",
")",
"{",
"new",
"EntityAssociationUpdater",
"(",
"this",
")",
".",
"id",
"(",
"id... | Removes the given entity from the inverse associations it manages. | [
"Removes",
"the",
"given",
"entity",
"from",
"the",
"inverse",
"associations",
"it",
"manages",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L1349-L1361 |
160,717 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.addToInverseAssociations | private void addToInverseAssociations(
Tuple resultset,
int tableIndex,
Serializable id,
SharedSessionContractImplementor session) {
new EntityAssociationUpdater( this )
.id( id )
.resultset( resultset )
.session( session )
.tableIndex( tableIndex )
.propertyMightRequireInverseAssociat... | java | private void addToInverseAssociations(
Tuple resultset,
int tableIndex,
Serializable id,
SharedSessionContractImplementor session) {
new EntityAssociationUpdater( this )
.id( id )
.resultset( resultset )
.session( session )
.tableIndex( tableIndex )
.propertyMightRequireInverseAssociat... | [
"private",
"void",
"addToInverseAssociations",
"(",
"Tuple",
"resultset",
",",
"int",
"tableIndex",
",",
"Serializable",
"id",
",",
"SharedSessionContractImplementor",
"session",
")",
"{",
"new",
"EntityAssociationUpdater",
"(",
"this",
")",
".",
"id",
"(",
"id",
... | Adds the given entity to the inverse associations it manages. | [
"Adds",
"the",
"given",
"entity",
"to",
"the",
"inverse",
"associations",
"it",
"manages",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L1366-L1378 |
160,718 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.processGeneratedProperties | private void processGeneratedProperties(
Serializable id,
Object entity,
Object[] state,
SharedSessionContractImplementor session,
GenerationTiming matchTiming) {
Tuple tuple = getFreshTuple( EntityKeyBuilder.fromPersister( this, id, session ), session );
saveSharedTuple( entity, tuple, session );
... | java | private void processGeneratedProperties(
Serializable id,
Object entity,
Object[] state,
SharedSessionContractImplementor session,
GenerationTiming matchTiming) {
Tuple tuple = getFreshTuple( EntityKeyBuilder.fromPersister( this, id, session ), session );
saveSharedTuple( entity, tuple, session );
... | [
"private",
"void",
"processGeneratedProperties",
"(",
"Serializable",
"id",
",",
"Object",
"entity",
",",
"Object",
"[",
"]",
"state",
",",
"SharedSessionContractImplementor",
"session",
",",
"GenerationTiming",
"matchTiming",
")",
"{",
"Tuple",
"tuple",
"=",
"getFr... | Re-reads the given entity, refreshing any properties updated on the server-side during insert or update. | [
"Re",
"-",
"reads",
"the",
"given",
"entity",
"refreshing",
"any",
"properties",
"updated",
"on",
"the",
"server",
"-",
"side",
"during",
"insert",
"or",
"update",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L1873-L1897 |
160,719 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java | OgmEntityPersister.isReadRequired | private boolean isReadRequired(ValueGeneration valueGeneration, GenerationTiming matchTiming) {
return valueGeneration != null && valueGeneration.getValueGenerator() == null &&
timingsMatch( valueGeneration.getGenerationTiming(), matchTiming );
} | java | private boolean isReadRequired(ValueGeneration valueGeneration, GenerationTiming matchTiming) {
return valueGeneration != null && valueGeneration.getValueGenerator() == null &&
timingsMatch( valueGeneration.getGenerationTiming(), matchTiming );
} | [
"private",
"boolean",
"isReadRequired",
"(",
"ValueGeneration",
"valueGeneration",
",",
"GenerationTiming",
"matchTiming",
")",
"{",
"return",
"valueGeneration",
"!=",
"null",
"&&",
"valueGeneration",
".",
"getValueGenerator",
"(",
")",
"==",
"null",
"&&",
"timingsMat... | Whether the given value generation strategy requires to read the value from the database or not. | [
"Whether",
"the",
"given",
"value",
"generation",
"strategy",
"requires",
"to",
"read",
"the",
"value",
"from",
"the",
"database",
"or",
"not",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L1902-L1905 |
160,720 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/util/impl/CustomLoaderHelper.java | CustomLoaderHelper.listOfEntities | public static List<Object> listOfEntities(SharedSessionContractImplementor session, Type[] resultTypes, ClosableIterator<Tuple> tuples) {
Class<?> returnedClass = resultTypes[0].getReturnedClass();
TupleBasedEntityLoader loader = getLoader( session, returnedClass );
OgmLoadingContext ogmLoadingContext = new OgmLo... | java | public static List<Object> listOfEntities(SharedSessionContractImplementor session, Type[] resultTypes, ClosableIterator<Tuple> tuples) {
Class<?> returnedClass = resultTypes[0].getReturnedClass();
TupleBasedEntityLoader loader = getLoader( session, returnedClass );
OgmLoadingContext ogmLoadingContext = new OgmLo... | [
"public",
"static",
"List",
"<",
"Object",
">",
"listOfEntities",
"(",
"SharedSessionContractImplementor",
"session",
",",
"Type",
"[",
"]",
"resultTypes",
",",
"ClosableIterator",
"<",
"Tuple",
">",
"tuples",
")",
"{",
"Class",
"<",
"?",
">",
"returnedClass",
... | At the moment we only support the case where one entity type is returned | [
"At",
"the",
"moment",
"we",
"only",
"support",
"the",
"case",
"where",
"one",
"entity",
"type",
"is",
"returned"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/util/impl/CustomLoaderHelper.java#L29-L35 |
160,721 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/massindex/impl/BatchCoordinator.java | BatchCoordinator.doBatchWork | private void doBatchWork(BatchBackend backend) throws InterruptedException {
ExecutorService executor = Executors.newFixedThreadPool( typesToIndexInParallel, "BatchIndexingWorkspace" );
for ( IndexedTypeIdentifier indexedTypeIdentifier : rootIndexedTypes ) {
executor.execute( new BatchIndexingWorkspace( gridDial... | java | private void doBatchWork(BatchBackend backend) throws InterruptedException {
ExecutorService executor = Executors.newFixedThreadPool( typesToIndexInParallel, "BatchIndexingWorkspace" );
for ( IndexedTypeIdentifier indexedTypeIdentifier : rootIndexedTypes ) {
executor.execute( new BatchIndexingWorkspace( gridDial... | [
"private",
"void",
"doBatchWork",
"(",
"BatchBackend",
"backend",
")",
"throws",
"InterruptedException",
"{",
"ExecutorService",
"executor",
"=",
"Executors",
".",
"newFixedThreadPool",
"(",
"typesToIndexInParallel",
",",
"\"BatchIndexingWorkspace\"",
")",
";",
"for",
"... | Will spawn a thread for each type in rootEntities, they will all re-join
on endAllSignal when finished.
@param backend
@throws InterruptedException
if interrupted while waiting for endAllSignal. | [
"Will",
"spawn",
"a",
"thread",
"for",
"each",
"type",
"in",
"rootEntities",
"they",
"will",
"all",
"re",
"-",
"join",
"on",
"endAllSignal",
"when",
"finished",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/massindex/impl/BatchCoordinator.java#L105-L113 |
160,722 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/massindex/impl/BatchCoordinator.java | BatchCoordinator.afterBatch | private void afterBatch(BatchBackend backend) {
IndexedTypeSet targetedTypes = searchFactoryImplementor.getIndexedTypesPolymorphic( rootIndexedTypes );
if ( this.optimizeAtEnd ) {
backend.optimize( targetedTypes );
}
backend.flush( targetedTypes );
} | java | private void afterBatch(BatchBackend backend) {
IndexedTypeSet targetedTypes = searchFactoryImplementor.getIndexedTypesPolymorphic( rootIndexedTypes );
if ( this.optimizeAtEnd ) {
backend.optimize( targetedTypes );
}
backend.flush( targetedTypes );
} | [
"private",
"void",
"afterBatch",
"(",
"BatchBackend",
"backend",
")",
"{",
"IndexedTypeSet",
"targetedTypes",
"=",
"searchFactoryImplementor",
".",
"getIndexedTypesPolymorphic",
"(",
"rootIndexedTypes",
")",
";",
"if",
"(",
"this",
".",
"optimizeAtEnd",
")",
"{",
"b... | Operations to do after all subthreads finished their work on index
@param backend | [
"Operations",
"to",
"do",
"after",
"all",
"subthreads",
"finished",
"their",
"work",
"on",
"index"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/massindex/impl/BatchCoordinator.java#L120-L126 |
160,723 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/massindex/impl/BatchCoordinator.java | BatchCoordinator.beforeBatch | private void beforeBatch(BatchBackend backend) {
if ( this.purgeAtStart ) {
// purgeAll for affected entities
IndexedTypeSet targetedTypes = searchFactoryImplementor.getIndexedTypesPolymorphic( rootIndexedTypes );
for ( IndexedTypeIdentifier type : targetedTypes ) {
// needs do be in-sync work to make su... | java | private void beforeBatch(BatchBackend backend) {
if ( this.purgeAtStart ) {
// purgeAll for affected entities
IndexedTypeSet targetedTypes = searchFactoryImplementor.getIndexedTypesPolymorphic( rootIndexedTypes );
for ( IndexedTypeIdentifier type : targetedTypes ) {
// needs do be in-sync work to make su... | [
"private",
"void",
"beforeBatch",
"(",
"BatchBackend",
"backend",
")",
"{",
"if",
"(",
"this",
".",
"purgeAtStart",
")",
"{",
"// purgeAll for affected entities",
"IndexedTypeSet",
"targetedTypes",
"=",
"searchFactoryImplementor",
".",
"getIndexedTypesPolymorphic",
"(",
... | Optional operations to do before the multiple-threads start indexing
@param backend | [
"Optional",
"operations",
"to",
"do",
"before",
"the",
"multiple",
"-",
"threads",
"start",
"indexing"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/massindex/impl/BatchCoordinator.java#L133-L145 |
160,724 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/util/impl/CollectionHelper.java | CollectionHelper.asSet | @SafeVarargs
public static <T> Set<T> asSet(T... ts) {
if ( ts == null ) {
return null;
}
else if ( ts.length == 0 ) {
return Collections.emptySet();
}
else {
Set<T> set = new HashSet<T>( getInitialCapacityFromExpectedSize( ts.length ) );
Collections.addAll( set, ts );
return Collections.unmod... | java | @SafeVarargs
public static <T> Set<T> asSet(T... ts) {
if ( ts == null ) {
return null;
}
else if ( ts.length == 0 ) {
return Collections.emptySet();
}
else {
Set<T> set = new HashSet<T>( getInitialCapacityFromExpectedSize( ts.length ) );
Collections.addAll( set, ts );
return Collections.unmod... | [
"@",
"SafeVarargs",
"public",
"static",
"<",
"T",
">",
"Set",
"<",
"T",
">",
"asSet",
"(",
"T",
"...",
"ts",
")",
"{",
"if",
"(",
"ts",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"if",
"(",
"ts",
".",
"length",
"==",
"0",
")"... | Returns an unmodifiable set containing the given elements.
@param ts the elements from which to create a set
@param <T> the type of the element in the set
@return an unmodifiable set containing the given elements or {@code null} in case the given element array is
{@code null}. | [
"Returns",
"an",
"unmodifiable",
"set",
"containing",
"the",
"given",
"elements",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/util/impl/CollectionHelper.java#L46-L59 |
160,725 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/type/impl/EnumType.java | EnumType.isOrdinal | private boolean isOrdinal(int paramType) {
switch ( paramType ) {
case Types.INTEGER:
case Types.NUMERIC:
case Types.SMALLINT:
case Types.TINYINT:
case Types.BIGINT:
case Types.DECIMAL: //for Oracle Driver
case Types.DOUBLE: //for Oracle Driver
case Types.FLOAT: //for Oracle Driver
retu... | java | private boolean isOrdinal(int paramType) {
switch ( paramType ) {
case Types.INTEGER:
case Types.NUMERIC:
case Types.SMALLINT:
case Types.TINYINT:
case Types.BIGINT:
case Types.DECIMAL: //for Oracle Driver
case Types.DOUBLE: //for Oracle Driver
case Types.FLOAT: //for Oracle Driver
retu... | [
"private",
"boolean",
"isOrdinal",
"(",
"int",
"paramType",
")",
"{",
"switch",
"(",
"paramType",
")",
"{",
"case",
"Types",
".",
"INTEGER",
":",
"case",
"Types",
".",
"NUMERIC",
":",
"case",
"Types",
".",
"SMALLINT",
":",
"case",
"Types",
".",
"TINYINT"... | in truth we probably only need the types as injected by the metadata binder | [
"in",
"truth",
"we",
"probably",
"only",
"need",
"the",
"types",
"as",
"injected",
"by",
"the",
"metadata",
"binder"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/type/impl/EnumType.java#L143-L161 |
160,726 | hibernate/hibernate-ogm | infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/impl/InfinispanEmbeddedStoredProceduresManager.java | InfinispanEmbeddedStoredProceduresManager.callStoredProcedure | public ClosableIterator<Tuple> callStoredProcedure(EmbeddedCacheManager embeddedCacheManager, String storedProcedureName, ProcedureQueryParameters queryParameters, ClassLoaderService classLoaderService ) {
validate( queryParameters );
Cache<String, String> cache = embeddedCacheManager.getCache( STORED_PROCEDURES_CA... | java | public ClosableIterator<Tuple> callStoredProcedure(EmbeddedCacheManager embeddedCacheManager, String storedProcedureName, ProcedureQueryParameters queryParameters, ClassLoaderService classLoaderService ) {
validate( queryParameters );
Cache<String, String> cache = embeddedCacheManager.getCache( STORED_PROCEDURES_CA... | [
"public",
"ClosableIterator",
"<",
"Tuple",
">",
"callStoredProcedure",
"(",
"EmbeddedCacheManager",
"embeddedCacheManager",
",",
"String",
"storedProcedureName",
",",
"ProcedureQueryParameters",
"queryParameters",
",",
"ClassLoaderService",
"classLoaderService",
")",
"{",
"v... | Returns the result of a stored procedure executed on the backend.
@param embeddedCacheManager embedded cache manager
@param storedProcedureName name of stored procedure
@param queryParameters parameters passed for this query
@param classLoaderService the class loader service
@return a {@link ClosableIterator} with th... | [
"Returns",
"the",
"result",
"of",
"a",
"stored",
"procedure",
"executed",
"on",
"the",
"backend",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/impl/InfinispanEmbeddedStoredProceduresManager.java#L51-L59 |
160,727 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/datastore/document/association/impl/DocumentHelpers.java | DocumentHelpers.getPrefix | public static String getPrefix(String column) {
return column.contains( "." ) ? DOT_SEPARATOR_PATTERN.split( column )[0] : null;
} | java | public static String getPrefix(String column) {
return column.contains( "." ) ? DOT_SEPARATOR_PATTERN.split( column )[0] : null;
} | [
"public",
"static",
"String",
"getPrefix",
"(",
"String",
"column",
")",
"{",
"return",
"column",
".",
"contains",
"(",
"\".\"",
")",
"?",
"DOT_SEPARATOR_PATTERN",
".",
"split",
"(",
"column",
")",
"[",
"0",
"]",
":",
"null",
";",
"}"
] | If the column name is a dotted column, returns the first part.
Returns null otherwise.
@param column the column that might have a prefix
@return the first part of the prefix of the column or {@code null} if the column does not have a prefix. | [
"If",
"the",
"column",
"name",
"is",
"a",
"dotted",
"column",
"returns",
"the",
"first",
"part",
".",
"Returns",
"null",
"otherwise",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/datastore/document/association/impl/DocumentHelpers.java#L26-L28 |
160,728 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/datastore/document/association/impl/DocumentHelpers.java | DocumentHelpers.getColumnSharedPrefix | public static String getColumnSharedPrefix(String[] associationKeyColumns) {
String prefix = null;
for ( String column : associationKeyColumns ) {
String newPrefix = getPrefix( column );
if ( prefix == null ) { // first iteration
prefix = newPrefix;
if ( prefix == null ) { // no prefix, quit
brea... | java | public static String getColumnSharedPrefix(String[] associationKeyColumns) {
String prefix = null;
for ( String column : associationKeyColumns ) {
String newPrefix = getPrefix( column );
if ( prefix == null ) { // first iteration
prefix = newPrefix;
if ( prefix == null ) { // no prefix, quit
brea... | [
"public",
"static",
"String",
"getColumnSharedPrefix",
"(",
"String",
"[",
"]",
"associationKeyColumns",
")",
"{",
"String",
"prefix",
"=",
"null",
";",
"for",
"(",
"String",
"column",
":",
"associationKeyColumns",
")",
"{",
"String",
"newPrefix",
"=",
"getPrefi... | Returns the shared prefix of these columns. Null otherwise.
@param associationKeyColumns the columns sharing a prefix
@return the shared prefix of these columns. {@code null} otherwise. | [
"Returns",
"the",
"shared",
"prefix",
"of",
"these",
"columns",
".",
"Null",
"otherwise",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/datastore/document/association/impl/DocumentHelpers.java#L36-L54 |
160,729 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/massindex/impl/Executors.java | Executors.newFixedThreadPool | public static ThreadPoolExecutor newFixedThreadPool(int threads, String groupname, int queueSize) {
return new ThreadPoolExecutor( threads, threads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(
queueSize ), new SearchThreadFactory( groupname ), new BlockPolicy() );
} | java | public static ThreadPoolExecutor newFixedThreadPool(int threads, String groupname, int queueSize) {
return new ThreadPoolExecutor( threads, threads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(
queueSize ), new SearchThreadFactory( groupname ), new BlockPolicy() );
} | [
"public",
"static",
"ThreadPoolExecutor",
"newFixedThreadPool",
"(",
"int",
"threads",
",",
"String",
"groupname",
",",
"int",
"queueSize",
")",
"{",
"return",
"new",
"ThreadPoolExecutor",
"(",
"threads",
",",
"threads",
",",
"0L",
",",
"TimeUnit",
".",
"MILLISE... | Creates a new fixed size ThreadPoolExecutor
@param threads
the number of threads
@param groupname
a label to identify the threadpool; useful for profiling.
@param queueSize
the size of the queue to store Runnables when all threads are busy
@return the new ExecutorService | [
"Creates",
"a",
"new",
"fixed",
"size",
"ThreadPoolExecutor"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/massindex/impl/Executors.java#L61-L64 |
160,730 | hibernate/hibernate-ogm | infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/persistencestrategy/common/externalizer/impl/VersionChecker.java | VersionChecker.readAndCheckVersion | public static void readAndCheckVersion(ObjectInput input, int supportedVersion, Class<?> externalizedType) throws IOException {
int version = input.readInt();
if ( version != supportedVersion ) {
throw LOG.unexpectedKeyVersion( externalizedType, version, supportedVersion );
}
} | java | public static void readAndCheckVersion(ObjectInput input, int supportedVersion, Class<?> externalizedType) throws IOException {
int version = input.readInt();
if ( version != supportedVersion ) {
throw LOG.unexpectedKeyVersion( externalizedType, version, supportedVersion );
}
} | [
"public",
"static",
"void",
"readAndCheckVersion",
"(",
"ObjectInput",
"input",
",",
"int",
"supportedVersion",
",",
"Class",
"<",
"?",
">",
"externalizedType",
")",
"throws",
"IOException",
"{",
"int",
"version",
"=",
"input",
".",
"readInt",
"(",
")",
";",
... | Consumes the version field from the given input and raises an exception if the record is in a newer version,
written by a newer version of Hibernate OGM.
@param input the input to read from
@param supportedVersion the type version supported by this version of OGM
@param externalizedType the type to be unmarshalled
@t... | [
"Consumes",
"the",
"version",
"field",
"from",
"the",
"given",
"input",
"and",
"raises",
"an",
"exception",
"if",
"the",
"record",
"is",
"in",
"a",
"newer",
"version",
"written",
"by",
"a",
"newer",
"version",
"of",
"Hibernate",
"OGM",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/persistencestrategy/common/externalizer/impl/VersionChecker.java#L35-L41 |
160,731 | hibernate/hibernate-ogm | neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/remote/common/util/impl/RemoteNeo4jHelper.java | RemoteNeo4jHelper.matches | public static boolean matches(Map<String, Object> nodeProperties, String[] keyColumnNames, Object[] keyColumnValues) {
for ( int i = 0; i < keyColumnNames.length; i++ ) {
String property = keyColumnNames[i];
Object expectedValue = keyColumnValues[i];
boolean containsProperty = nodeProperties.containsKey( pro... | java | public static boolean matches(Map<String, Object> nodeProperties, String[] keyColumnNames, Object[] keyColumnValues) {
for ( int i = 0; i < keyColumnNames.length; i++ ) {
String property = keyColumnNames[i];
Object expectedValue = keyColumnValues[i];
boolean containsProperty = nodeProperties.containsKey( pro... | [
"public",
"static",
"boolean",
"matches",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"nodeProperties",
",",
"String",
"[",
"]",
"keyColumnNames",
",",
"Object",
"[",
"]",
"keyColumnValues",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",... | Check if the node matches the column values
@param nodeProperties the properties on the node
@param keyColumnNames the name of the columns to check
@param keyColumnValues the value of the columns to check
@return true if the properties of the node match the column names and values | [
"Check",
"if",
"the",
"node",
"matches",
"the",
"column",
"values"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/remote/common/util/impl/RemoteNeo4jHelper.java#L29-L45 |
160,732 | hibernate/hibernate-ogm | mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/GeoPolygon.java | GeoPolygon.addHoles | public GeoPolygon addHoles(List<List<GeoPoint>> holes) {
Contracts.assertNotNull( holes, "holes" );
this.rings.addAll( holes );
return this;
} | java | public GeoPolygon addHoles(List<List<GeoPoint>> holes) {
Contracts.assertNotNull( holes, "holes" );
this.rings.addAll( holes );
return this;
} | [
"public",
"GeoPolygon",
"addHoles",
"(",
"List",
"<",
"List",
"<",
"GeoPoint",
">",
">",
"holes",
")",
"{",
"Contracts",
".",
"assertNotNull",
"(",
"holes",
",",
"\"holes\"",
")",
";",
"this",
".",
"rings",
".",
"addAll",
"(",
"holes",
")",
";",
"retur... | Adds new holes to the polygon.
@param holes holes, must be contained in the exterior ring and must not overlap or
intersect another hole
@return this for chaining | [
"Adds",
"new",
"holes",
"to",
"the",
"polygon",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/GeoPolygon.java#L117-L121 |
160,733 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/options/container/impl/OptionsContainerBuilder.java | OptionsContainerBuilder.addAll | public void addAll(OptionsContainerBuilder container) {
for ( Entry<Class<? extends Option<?, ?>>, ValueContainerBuilder<?, ?>> entry : container.optionValues.entrySet() ) {
addAll( entry.getKey(), entry.getValue().build() );
}
} | java | public void addAll(OptionsContainerBuilder container) {
for ( Entry<Class<? extends Option<?, ?>>, ValueContainerBuilder<?, ?>> entry : container.optionValues.entrySet() ) {
addAll( entry.getKey(), entry.getValue().build() );
}
} | [
"public",
"void",
"addAll",
"(",
"OptionsContainerBuilder",
"container",
")",
"{",
"for",
"(",
"Entry",
"<",
"Class",
"<",
"?",
"extends",
"Option",
"<",
"?",
",",
"?",
">",
">",
",",
"ValueContainerBuilder",
"<",
"?",
",",
"?",
">",
">",
"entry",
":",... | Adds all options from the passed container to this container.
@param container a container with options to add | [
"Adds",
"all",
"options",
"from",
"the",
"passed",
"container",
"to",
"this",
"container",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/options/container/impl/OptionsContainerBuilder.java#L59-L63 |
160,734 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/massindex/impl/OgmMassIndexer.java | OgmMassIndexer.toRootEntities | private static IndexedTypeSet toRootEntities(ExtendedSearchIntegrator extendedIntegrator, Class<?>... selection) {
Set<Class<?>> entities = new HashSet<Class<?>>();
//first build the "entities" set containing all indexed subtypes of "selection".
for ( Class<?> entityType : selection ) {
IndexedTypeSet targeted... | java | private static IndexedTypeSet toRootEntities(ExtendedSearchIntegrator extendedIntegrator, Class<?>... selection) {
Set<Class<?>> entities = new HashSet<Class<?>>();
//first build the "entities" set containing all indexed subtypes of "selection".
for ( Class<?> entityType : selection ) {
IndexedTypeSet targeted... | [
"private",
"static",
"IndexedTypeSet",
"toRootEntities",
"(",
"ExtendedSearchIntegrator",
"extendedIntegrator",
",",
"Class",
"<",
"?",
">",
"...",
"selection",
")",
"{",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"entities",
"=",
"new",
"HashSet",
"<",
"Class",... | From the set of classes a new set is built containing all indexed
subclasses, but removing then all subtypes of indexed entities.
@param selection
@return a new set of entities | [
"From",
"the",
"set",
"of",
"classes",
"a",
"new",
"set",
"is",
"built",
"containing",
"all",
"indexed",
"subclasses",
"but",
"removing",
"then",
"all",
"subtypes",
"of",
"indexed",
"entities",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/massindex/impl/OgmMassIndexer.java#L181-L213 |
160,735 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/util/impl/AssociationPersister.java | AssociationPersister.updateHostingEntityIfRequired | private void updateHostingEntityIfRequired() {
if ( hostingEntity != null && hostingEntityRequiresReadAfterUpdate() ) {
OgmEntityPersister entityPersister = getHostingEntityPersister();
if ( GridDialects.hasFacet( gridDialect, GroupingByEntityDialect.class ) ) {
( (GroupingByEntityDialect) gridDialect ).fl... | java | private void updateHostingEntityIfRequired() {
if ( hostingEntity != null && hostingEntityRequiresReadAfterUpdate() ) {
OgmEntityPersister entityPersister = getHostingEntityPersister();
if ( GridDialects.hasFacet( gridDialect, GroupingByEntityDialect.class ) ) {
( (GroupingByEntityDialect) gridDialect ).fl... | [
"private",
"void",
"updateHostingEntityIfRequired",
"(",
")",
"{",
"if",
"(",
"hostingEntity",
"!=",
"null",
"&&",
"hostingEntityRequiresReadAfterUpdate",
"(",
")",
")",
"{",
"OgmEntityPersister",
"entityPersister",
"=",
"getHostingEntityPersister",
"(",
")",
";",
"if... | Reads the entity hosting the association from the datastore and applies any property changes from the server
side. | [
"Reads",
"the",
"entity",
"hosting",
"the",
"association",
"from",
"the",
"datastore",
"and",
"applies",
"any",
"property",
"changes",
"from",
"the",
"server",
"side",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/util/impl/AssociationPersister.java#L249-L265 |
160,736 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/options/navigation/impl/OptionsContextImpl.java | OptionsContextImpl.getClassHierarchy | private static List<Class<?>> getClassHierarchy(Class<?> clazz) {
List<Class<?>> hierarchy = new ArrayList<Class<?>>( 4 );
for ( Class<?> current = clazz; current != null; current = current.getSuperclass() ) {
hierarchy.add( current );
}
return hierarchy;
} | java | private static List<Class<?>> getClassHierarchy(Class<?> clazz) {
List<Class<?>> hierarchy = new ArrayList<Class<?>>( 4 );
for ( Class<?> current = clazz; current != null; current = current.getSuperclass() ) {
hierarchy.add( current );
}
return hierarchy;
} | [
"private",
"static",
"List",
"<",
"Class",
"<",
"?",
">",
">",
"getClassHierarchy",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"List",
"<",
"Class",
"<",
"?",
">",
">",
"hierarchy",
"=",
"new",
"ArrayList",
"<",
"Class",
"<",
"?",
">",
">",
... | Returns the class hierarchy of the given type, from bottom to top, starting with the given class itself.
Interfaces are not included.
@param clazz the class of interest
@return the class hierarchy of the given class | [
"Returns",
"the",
"class",
"hierarchy",
"of",
"the",
"given",
"type",
"from",
"bottom",
"to",
"top",
"starting",
"with",
"the",
"given",
"class",
"itself",
".",
"Interfaces",
"are",
"not",
"included",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/options/navigation/impl/OptionsContextImpl.java#L153-L161 |
160,737 | hibernate/hibernate-ogm | infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/persistencestrategy/impl/PersistenceStrategy.java | PersistenceStrategy.getInstance | public static PersistenceStrategy<?, ?, ?> getInstance(
CacheMappingType cacheMapping,
EmbeddedCacheManager externalCacheManager,
URL configurationUrl,
JtaPlatform jtaPlatform,
Set<EntityKeyMetadata> entityTypes,
Set<AssociationKeyMetadata> associationTypes,
Set<IdSourceKeyMetadata> idSourceTypes )... | java | public static PersistenceStrategy<?, ?, ?> getInstance(
CacheMappingType cacheMapping,
EmbeddedCacheManager externalCacheManager,
URL configurationUrl,
JtaPlatform jtaPlatform,
Set<EntityKeyMetadata> entityTypes,
Set<AssociationKeyMetadata> associationTypes,
Set<IdSourceKeyMetadata> idSourceTypes )... | [
"public",
"static",
"PersistenceStrategy",
"<",
"?",
",",
"?",
",",
"?",
">",
"getInstance",
"(",
"CacheMappingType",
"cacheMapping",
",",
"EmbeddedCacheManager",
"externalCacheManager",
",",
"URL",
"configurationUrl",
",",
"JtaPlatform",
"jtaPlatform",
",",
"Set",
... | Returns a persistence strategy based on the passed configuration.
@param cacheMapping the selected {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType}
@param externalCacheManager the infinispan cache manager
@param configurationUrl the location of the configuration file
@param jtaPlatform the {@link ... | [
"Returns",
"a",
"persistence",
"strategy",
"based",
"on",
"the",
"passed",
"configuration",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/persistencestrategy/impl/PersistenceStrategy.java#L61-L87 |
160,738 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/service/impl/DefaultSchemaInitializationContext.java | DefaultSchemaInitializationContext.getPersistentGenerators | private Iterable<PersistentNoSqlIdentifierGenerator> getPersistentGenerators() {
Map<String, EntityPersister> entityPersisters = factory.getMetamodel().entityPersisters();
Set<PersistentNoSqlIdentifierGenerator> persistentGenerators = new HashSet<PersistentNoSqlIdentifierGenerator>( entityPersisters.size() );
fo... | java | private Iterable<PersistentNoSqlIdentifierGenerator> getPersistentGenerators() {
Map<String, EntityPersister> entityPersisters = factory.getMetamodel().entityPersisters();
Set<PersistentNoSqlIdentifierGenerator> persistentGenerators = new HashSet<PersistentNoSqlIdentifierGenerator>( entityPersisters.size() );
fo... | [
"private",
"Iterable",
"<",
"PersistentNoSqlIdentifierGenerator",
">",
"getPersistentGenerators",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"EntityPersister",
">",
"entityPersisters",
"=",
"factory",
".",
"getMetamodel",
"(",
")",
".",
"entityPersisters",
"(",
")",
... | Returns all the persistent id generators which potentially require the creation of an object in the schema. | [
"Returns",
"all",
"the",
"persistent",
"id",
"generators",
"which",
"potentially",
"require",
"the",
"creation",
"of",
"an",
"object",
"in",
"the",
"schema",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/service/impl/DefaultSchemaInitializationContext.java#L105-L116 |
160,739 | hibernate/hibernate-ogm | neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jAssociationQueries.java | EmbeddedNeo4jAssociationQueries.createRelationshipForEmbeddedAssociation | public Relationship createRelationshipForEmbeddedAssociation(GraphDatabaseService executionEngine, AssociationKey associationKey, EntityKey embeddedKey) {
String query = initCreateEmbeddedAssociationQuery( associationKey, embeddedKey );
Object[] queryValues = createRelationshipForEmbeddedQueryValues( associationKey... | java | public Relationship createRelationshipForEmbeddedAssociation(GraphDatabaseService executionEngine, AssociationKey associationKey, EntityKey embeddedKey) {
String query = initCreateEmbeddedAssociationQuery( associationKey, embeddedKey );
Object[] queryValues = createRelationshipForEmbeddedQueryValues( associationKey... | [
"public",
"Relationship",
"createRelationshipForEmbeddedAssociation",
"(",
"GraphDatabaseService",
"executionEngine",
",",
"AssociationKey",
"associationKey",
",",
"EntityKey",
"embeddedKey",
")",
"{",
"String",
"query",
"=",
"initCreateEmbeddedAssociationQuery",
"(",
"associat... | Give an embedded association, creates all the nodes and relationships required to represent it.
It assumes that the entity node containing the association already exists in the db.
@param executionEngine the {@link GraphDatabaseService} to run the query
@param associationKey the {@link AssociationKey} identifying the ... | [
"Give",
"an",
"embedded",
"association",
"creates",
"all",
"the",
"nodes",
"and",
"relationships",
"required",
"to",
"represent",
"it",
".",
"It",
"assumes",
"that",
"the",
"entity",
"node",
"containing",
"the",
"association",
"already",
"exists",
"in",
"the",
... | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jAssociationQueries.java#L136-L140 |
160,740 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmCollectionPersister.java | OgmCollectionPersister.createAndPutAssociationRowForInsert | private RowKeyAndTuple createAndPutAssociationRowForInsert(Serializable key, PersistentCollection collection,
AssociationPersister associationPersister, SharedSessionContractImplementor session, int i, Object entry) {
RowKeyBuilder rowKeyBuilder = initializeRowKeyBuilder();
Tuple associationRow = new Tuple();
... | java | private RowKeyAndTuple createAndPutAssociationRowForInsert(Serializable key, PersistentCollection collection,
AssociationPersister associationPersister, SharedSessionContractImplementor session, int i, Object entry) {
RowKeyBuilder rowKeyBuilder = initializeRowKeyBuilder();
Tuple associationRow = new Tuple();
... | [
"private",
"RowKeyAndTuple",
"createAndPutAssociationRowForInsert",
"(",
"Serializable",
"key",
",",
"PersistentCollection",
"collection",
",",
"AssociationPersister",
"associationPersister",
",",
"SharedSessionContractImplementor",
"session",
",",
"int",
"i",
",",
"Object",
... | Creates an association row representing the given entry and adds it to the association managed by the given
persister. | [
"Creates",
"an",
"association",
"row",
"representing",
"the",
"given",
"entry",
"and",
"adds",
"it",
"to",
"the",
"association",
"managed",
"by",
"the",
"given",
"persister",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmCollectionPersister.java#L384-L414 |
160,741 | hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/persister/impl/OgmCollectionPersister.java | OgmCollectionPersister.doProcessQueuedOps | @Override
protected void doProcessQueuedOps(PersistentCollection collection, Serializable key, int nextIndex, SharedSessionContractImplementor session)
throws HibernateException {
// nothing to do
} | java | @Override
protected void doProcessQueuedOps(PersistentCollection collection, Serializable key, int nextIndex, SharedSessionContractImplementor session)
throws HibernateException {
// nothing to do
} | [
"@",
"Override",
"protected",
"void",
"doProcessQueuedOps",
"(",
"PersistentCollection",
"collection",
",",
"Serializable",
"key",
",",
"int",
"nextIndex",
",",
"SharedSessionContractImplementor",
"session",
")",
"throws",
"HibernateException",
"{",
"// nothing to do",
"}... | once we're on ORM 5 | [
"once",
"we",
"re",
"on",
"ORM",
"5"
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmCollectionPersister.java#L834-L838 |
160,742 | hibernate/hibernate-ogm | neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jPropertyHelper.java | Neo4jPropertyHelper.isIdProperty | public boolean isIdProperty(OgmEntityPersister persister, List<String> namesWithoutAlias) {
String join = StringHelper.join( namesWithoutAlias, "." );
Type propertyType = persister.getPropertyType( namesWithoutAlias.get( 0 ) );
String[] identifierColumnNames = persister.getIdentifierColumnNames();
if ( property... | java | public boolean isIdProperty(OgmEntityPersister persister, List<String> namesWithoutAlias) {
String join = StringHelper.join( namesWithoutAlias, "." );
Type propertyType = persister.getPropertyType( namesWithoutAlias.get( 0 ) );
String[] identifierColumnNames = persister.getIdentifierColumnNames();
if ( property... | [
"public",
"boolean",
"isIdProperty",
"(",
"OgmEntityPersister",
"persister",
",",
"List",
"<",
"String",
">",
"namesWithoutAlias",
")",
"{",
"String",
"join",
"=",
"StringHelper",
".",
"join",
"(",
"namesWithoutAlias",
",",
"\".\"",
")",
";",
"Type",
"propertyTy... | Check if the property is part of the identifier of the entity.
@param persister the {@link OgmEntityPersister} of the entity with the property
@param namesWithoutAlias the path to the property with all the aliases resolved
@return {@code true} if the property is part of the id, {@code false} otherwise. | [
"Check",
"if",
"the",
"property",
"is",
"part",
"of",
"the",
"identifier",
"of",
"the",
"entity",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jPropertyHelper.java#L164-L178 |
160,743 | hibernate/hibernate-ogm | infinispan-remote/src/main/java/org/hibernate/ogm/datastore/infinispanremote/impl/protobuf/schema/SchemaDefinitions.java | SchemaDefinitions.deploySchema | public void deploySchema(String generatedProtobufName, RemoteCache<String, String> protobufCache, SchemaCapture schemaCapture, SchemaOverride schemaOverrideService,
URL schemaOverrideResource) {
// user defined schema
if ( schemaOverrideService != null || schemaOverrideResource != null ) {
cachedSchema = new ... | java | public void deploySchema(String generatedProtobufName, RemoteCache<String, String> protobufCache, SchemaCapture schemaCapture, SchemaOverride schemaOverrideService,
URL schemaOverrideResource) {
// user defined schema
if ( schemaOverrideService != null || schemaOverrideResource != null ) {
cachedSchema = new ... | [
"public",
"void",
"deploySchema",
"(",
"String",
"generatedProtobufName",
",",
"RemoteCache",
"<",
"String",
",",
"String",
">",
"protobufCache",
",",
"SchemaCapture",
"schemaCapture",
",",
"SchemaOverride",
"schemaOverrideService",
",",
"URL",
"schemaOverrideResource",
... | Typically this is transparently handled by using the Protostream codecs but be aware of it when bypassing Protostream. | [
"Typically",
"this",
"is",
"transparently",
"handled",
"by",
"using",
"the",
"Protostream",
"codecs",
"but",
"be",
"aware",
"of",
"it",
"when",
"bypassing",
"Protostream",
"."
] | 9ea971df7c27277029006a6f748d8272fb1d69d2 | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-remote/src/main/java/org/hibernate/ogm/datastore/infinispanremote/impl/protobuf/schema/SchemaDefinitions.java#L54-L78 |
160,744 | JetBrains/xodus | compress/src/main/java/jetbrains/exodus/util/CompressBackupUtil.java | CompressBackupUtil.archiveFile | public static void archiveFile(@NotNull final ArchiveOutputStream out,
@NotNull final VirtualFileDescriptor source,
final long fileSize) throws IOException {
if (!source.hasContent()) {
throw new IllegalArgumentException("Provided... | java | public static void archiveFile(@NotNull final ArchiveOutputStream out,
@NotNull final VirtualFileDescriptor source,
final long fileSize) throws IOException {
if (!source.hasContent()) {
throw new IllegalArgumentException("Provided... | [
"public",
"static",
"void",
"archiveFile",
"(",
"@",
"NotNull",
"final",
"ArchiveOutputStream",
"out",
",",
"@",
"NotNull",
"final",
"VirtualFileDescriptor",
"source",
",",
"final",
"long",
"fileSize",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"source",... | Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream
properly.
@param out target archive.
@param source file to be added.
@param fileSize size of the file (which is known in most cases).
@throws IOException in case of any issues with underlying store... | [
"Adds",
"the",
"file",
"to",
"the",
"tar",
"archive",
"represented",
"by",
"output",
"stream",
".",
"It",
"s",
"caller",
"s",
"responsibility",
"to",
"close",
"output",
"stream",
"properly",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/compress/src/main/java/jetbrains/exodus/util/CompressBackupUtil.java#L226-L255 |
160,745 | JetBrains/xodus | environment/src/main/java/jetbrains/exodus/tree/patricia/MutableNode.java | MutableNode.setRightChild | void setRightChild(final byte b, @NotNull final MutableNode child) {
final ChildReference right = children.getRight();
if (right == null || (right.firstByte & 0xff) != (b & 0xff)) {
throw new IllegalArgumentException();
}
children.setAt(children.size() - 1, new ChildReference... | java | void setRightChild(final byte b, @NotNull final MutableNode child) {
final ChildReference right = children.getRight();
if (right == null || (right.firstByte & 0xff) != (b & 0xff)) {
throw new IllegalArgumentException();
}
children.setAt(children.size() - 1, new ChildReference... | [
"void",
"setRightChild",
"(",
"final",
"byte",
"b",
",",
"@",
"NotNull",
"final",
"MutableNode",
"child",
")",
"{",
"final",
"ChildReference",
"right",
"=",
"children",
".",
"getRight",
"(",
")",
";",
"if",
"(",
"right",
"==",
"null",
"||",
"(",
"right",... | Sets in-place the right child with the same first byte.
@param b next byte of child suffix.
@param child child node. | [
"Sets",
"in",
"-",
"place",
"the",
"right",
"child",
"with",
"the",
"same",
"first",
"byte",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/environment/src/main/java/jetbrains/exodus/tree/patricia/MutableNode.java#L190-L196 |
160,746 | JetBrains/xodus | environment/src/main/java/jetbrains/exodus/tree/btree/BTreeBalancePolicy.java | BTreeBalancePolicy.needMerge | public boolean needMerge(@NotNull final BasePage left, @NotNull final BasePage right) {
final int leftSize = left.getSize();
final int rightSize = right.getSize();
return leftSize == 0 || rightSize == 0 ||
leftSize + rightSize <= (((isDupTree(left) ? getDupPageMaxSize() : getPageMaxS... | java | public boolean needMerge(@NotNull final BasePage left, @NotNull final BasePage right) {
final int leftSize = left.getSize();
final int rightSize = right.getSize();
return leftSize == 0 || rightSize == 0 ||
leftSize + rightSize <= (((isDupTree(left) ? getDupPageMaxSize() : getPageMaxS... | [
"public",
"boolean",
"needMerge",
"(",
"@",
"NotNull",
"final",
"BasePage",
"left",
",",
"@",
"NotNull",
"final",
"BasePage",
"right",
")",
"{",
"final",
"int",
"leftSize",
"=",
"left",
".",
"getSize",
"(",
")",
";",
"final",
"int",
"rightSize",
"=",
"ri... | Is invoked on the leaf deletion only.
@param left left page.
@param right right page.
@return true if the left page ought to be merged with the right one. | [
"Is",
"invoked",
"on",
"the",
"leaf",
"deletion",
"only",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/environment/src/main/java/jetbrains/exodus/tree/btree/BTreeBalancePolicy.java#L70-L75 |
160,747 | JetBrains/xodus | environment/src/main/java/jetbrains/exodus/env/MetaTreeImpl.java | MetaTreeImpl.saveMetaTree | @NotNull
static MetaTreeImpl.Proto saveMetaTree(@NotNull final ITreeMutable metaTree,
@NotNull final EnvironmentImpl env,
@NotNull final ExpiredLoggableCollection expired) {
final long newMetaTreeAddress = metaTree.save();... | java | @NotNull
static MetaTreeImpl.Proto saveMetaTree(@NotNull final ITreeMutable metaTree,
@NotNull final EnvironmentImpl env,
@NotNull final ExpiredLoggableCollection expired) {
final long newMetaTreeAddress = metaTree.save();... | [
"@",
"NotNull",
"static",
"MetaTreeImpl",
".",
"Proto",
"saveMetaTree",
"(",
"@",
"NotNull",
"final",
"ITreeMutable",
"metaTree",
",",
"@",
"NotNull",
"final",
"EnvironmentImpl",
"env",
",",
"@",
"NotNull",
"final",
"ExpiredLoggableCollection",
"expired",
")",
"{"... | Saves meta tree, writes database root and flushes the log.
@param metaTree mutable meta tree
@param env enclosing environment
@param expired expired loggables (database root to be added)
@return database root loggable which is read again from the log. | [
"Saves",
"meta",
"tree",
"writes",
"database",
"root",
"and",
"flushes",
"the",
"log",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/environment/src/main/java/jetbrains/exodus/env/MetaTreeImpl.java#L180-L191 |
160,748 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java | PersistentEntityStoreImpl.clearProperties | @SuppressWarnings({"OverlyLongMethod"})
public void clearProperties(@NotNull final PersistentStoreTransaction txn, @NotNull final Entity entity) {
final Transaction envTxn = txn.getEnvironmentTransaction();
final PersistentEntityId id = (PersistentEntityId) entity.getId();
final int entityTy... | java | @SuppressWarnings({"OverlyLongMethod"})
public void clearProperties(@NotNull final PersistentStoreTransaction txn, @NotNull final Entity entity) {
final Transaction envTxn = txn.getEnvironmentTransaction();
final PersistentEntityId id = (PersistentEntityId) entity.getId();
final int entityTy... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"OverlyLongMethod\"",
"}",
")",
"public",
"void",
"clearProperties",
"(",
"@",
"NotNull",
"final",
"PersistentStoreTransaction",
"txn",
",",
"@",
"NotNull",
"final",
"Entity",
"entity",
")",
"{",
"final",
"Transaction",
"envTxn... | Clears all properties of specified entity.
@param entity to clear. | [
"Clears",
"all",
"properties",
"of",
"specified",
"entity",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java#L967-L990 |
160,749 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java | PersistentEntityStoreImpl.deleteEntity | boolean deleteEntity(@NotNull final PersistentStoreTransaction txn, @NotNull final PersistentEntity entity) {
clearProperties(txn, entity);
clearBlobs(txn, entity);
deleteLinks(txn, entity);
final PersistentEntityId id = entity.getId();
final int entityTypeId = id.getTypeId();
... | java | boolean deleteEntity(@NotNull final PersistentStoreTransaction txn, @NotNull final PersistentEntity entity) {
clearProperties(txn, entity);
clearBlobs(txn, entity);
deleteLinks(txn, entity);
final PersistentEntityId id = entity.getId();
final int entityTypeId = id.getTypeId();
... | [
"boolean",
"deleteEntity",
"(",
"@",
"NotNull",
"final",
"PersistentStoreTransaction",
"txn",
",",
"@",
"NotNull",
"final",
"PersistentEntity",
"entity",
")",
"{",
"clearProperties",
"(",
"txn",
",",
"entity",
")",
";",
"clearBlobs",
"(",
"txn",
",",
"entity",
... | Deletes specified entity clearing all its properties and deleting all its outgoing links.
@param entity to delete. | [
"Deletes",
"specified",
"entity",
"clearing",
"all",
"its",
"properties",
"and",
"deleting",
"all",
"its",
"outgoing",
"links",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java#L1510-L1536 |
160,750 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java | PersistentEntityStoreImpl.deleteLinks | private void deleteLinks(@NotNull final PersistentStoreTransaction txn, @NotNull final PersistentEntity entity) {
final PersistentEntityId id = entity.getId();
final int entityTypeId = id.getTypeId();
final long entityLocalId = id.getLocalId();
final Transaction envTxn = txn.getEnvironme... | java | private void deleteLinks(@NotNull final PersistentStoreTransaction txn, @NotNull final PersistentEntity entity) {
final PersistentEntityId id = entity.getId();
final int entityTypeId = id.getTypeId();
final long entityLocalId = id.getLocalId();
final Transaction envTxn = txn.getEnvironme... | [
"private",
"void",
"deleteLinks",
"(",
"@",
"NotNull",
"final",
"PersistentStoreTransaction",
"txn",
",",
"@",
"NotNull",
"final",
"PersistentEntity",
"entity",
")",
"{",
"final",
"PersistentEntityId",
"id",
"=",
"entity",
".",
"getId",
"(",
")",
";",
"final",
... | Deletes all outgoing links of specified entity.
@param entity the entity. | [
"Deletes",
"all",
"outgoing",
"links",
"of",
"specified",
"entity",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java#L1543-L1572 |
160,751 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java | PersistentEntityStoreImpl.getEntityTypeId | @Deprecated
public int getEntityTypeId(@NotNull final String entityType, final boolean allowCreate) {
return getEntityTypeId(txnProvider, entityType, allowCreate);
} | java | @Deprecated
public int getEntityTypeId(@NotNull final String entityType, final boolean allowCreate) {
return getEntityTypeId(txnProvider, entityType, allowCreate);
} | [
"@",
"Deprecated",
"public",
"int",
"getEntityTypeId",
"(",
"@",
"NotNull",
"final",
"String",
"entityType",
",",
"final",
"boolean",
"allowCreate",
")",
"{",
"return",
"getEntityTypeId",
"(",
"txnProvider",
",",
"entityType",
",",
"allowCreate",
")",
";",
"}"
] | Gets or creates id of the entity type.
@param entityType entity type name.
@param allowCreate if set to true and if there is no entity type like entityType,
create the new id for the entityType.
@return entity type id. | [
"Gets",
"or",
"creates",
"id",
"of",
"the",
"entity",
"type",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java#L1587-L1590 |
160,752 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java | PersistentEntityStoreImpl.getPropertyId | public int getPropertyId(@NotNull final PersistentStoreTransaction txn, @NotNull final String propertyName, final boolean allowCreate) {
return allowCreate ? propertyIds.getOrAllocateId(txn, propertyName) : propertyIds.getId(txn, propertyName);
} | java | public int getPropertyId(@NotNull final PersistentStoreTransaction txn, @NotNull final String propertyName, final boolean allowCreate) {
return allowCreate ? propertyIds.getOrAllocateId(txn, propertyName) : propertyIds.getId(txn, propertyName);
} | [
"public",
"int",
"getPropertyId",
"(",
"@",
"NotNull",
"final",
"PersistentStoreTransaction",
"txn",
",",
"@",
"NotNull",
"final",
"String",
"propertyName",
",",
"final",
"boolean",
"allowCreate",
")",
"{",
"return",
"allowCreate",
"?",
"propertyIds",
".",
"getOrA... | Gets id of a property and creates the new one if necessary.
@param txn transaction
@param propertyName name of the property.
@param allowCreate if set to true and if there is no property named as propertyName,
create the new id for the propertyName.
@return < 0 if there is no such property and create=false, ... | [
"Gets",
"id",
"of",
"a",
"property",
"and",
"creates",
"the",
"new",
"one",
"if",
"necessary",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java#L1725-L1727 |
160,753 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java | PersistentEntityStoreImpl.getLinkId | public int getLinkId(@NotNull final PersistentStoreTransaction txn, @NotNull final String linkName, final boolean allowCreate) {
return allowCreate ? linkIds.getOrAllocateId(txn, linkName) : linkIds.getId(txn, linkName);
} | java | public int getLinkId(@NotNull final PersistentStoreTransaction txn, @NotNull final String linkName, final boolean allowCreate) {
return allowCreate ? linkIds.getOrAllocateId(txn, linkName) : linkIds.getId(txn, linkName);
} | [
"public",
"int",
"getLinkId",
"(",
"@",
"NotNull",
"final",
"PersistentStoreTransaction",
"txn",
",",
"@",
"NotNull",
"final",
"String",
"linkName",
",",
"final",
"boolean",
"allowCreate",
")",
"{",
"return",
"allowCreate",
"?",
"linkIds",
".",
"getOrAllocateId",
... | Gets id of a link and creates the new one if necessary.
@param linkName name of the link.
@param allowCreate if set to true and if there is no link named as linkName,
create the new id for the linkName.
@return < 0 if there is no such link and create=false, else id of the link | [
"Gets",
"id",
"of",
"a",
"link",
"and",
"creates",
"the",
"new",
"one",
"if",
"necessary",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java#L1751-L1753 |
160,754 | JetBrains/xodus | utils/src/main/java/jetbrains/exodus/core/execution/ThreadJobProcessor.java | ThreadJobProcessor.start | @Override
public synchronized void start() {
if (!started.getAndSet(true)) {
finished.set(false);
thread.start();
}
} | java | @Override
public synchronized void start() {
if (!started.getAndSet(true)) {
finished.set(false);
thread.start();
}
} | [
"@",
"Override",
"public",
"synchronized",
"void",
"start",
"(",
")",
"{",
"if",
"(",
"!",
"started",
".",
"getAndSet",
"(",
"true",
")",
")",
"{",
"finished",
".",
"set",
"(",
"false",
")",
";",
"thread",
".",
"start",
"(",
")",
";",
"}",
"}"
] | Starts processor thread. | [
"Starts",
"processor",
"thread",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/utils/src/main/java/jetbrains/exodus/core/execution/ThreadJobProcessor.java#L53-L59 |
160,755 | JetBrains/xodus | utils/src/main/java/jetbrains/exodus/core/execution/ThreadJobProcessor.java | ThreadJobProcessor.finish | @Override
public void finish() {
if (started.get() && !finished.getAndSet(true)) {
waitUntilFinished();
super.finish();
// recreate thread (don't start) for processor reuse
createProcessorThread();
clearQueues();
started.set(false);
... | java | @Override
public void finish() {
if (started.get() && !finished.getAndSet(true)) {
waitUntilFinished();
super.finish();
// recreate thread (don't start) for processor reuse
createProcessorThread();
clearQueues();
started.set(false);
... | [
"@",
"Override",
"public",
"void",
"finish",
"(",
")",
"{",
"if",
"(",
"started",
".",
"get",
"(",
")",
"&&",
"!",
"finished",
".",
"getAndSet",
"(",
"true",
")",
")",
"{",
"waitUntilFinished",
"(",
")",
";",
"super",
".",
"finish",
"(",
")",
";",
... | Signals that the processor to finish and waits until it finishes. | [
"Signals",
"that",
"the",
"processor",
"to",
"finish",
"and",
"waits",
"until",
"it",
"finishes",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/utils/src/main/java/jetbrains/exodus/core/execution/ThreadJobProcessor.java#L64-L74 |
160,756 | JetBrains/xodus | environment/src/main/java/jetbrains/exodus/env/ReentrantTransactionDispatcher.java | ReentrantTransactionDispatcher.acquireTransaction | int acquireTransaction(@NotNull final Thread thread) {
try (CriticalSection ignored = criticalSection.enter()) {
final int currentThreadPermits = getThreadPermitsToAcquire(thread);
waitForPermits(thread, currentThreadPermits > 0 ? nestedQueue : regularQueue, 1, currentThreadPermits);
... | java | int acquireTransaction(@NotNull final Thread thread) {
try (CriticalSection ignored = criticalSection.enter()) {
final int currentThreadPermits = getThreadPermitsToAcquire(thread);
waitForPermits(thread, currentThreadPermits > 0 ? nestedQueue : regularQueue, 1, currentThreadPermits);
... | [
"int",
"acquireTransaction",
"(",
"@",
"NotNull",
"final",
"Thread",
"thread",
")",
"{",
"try",
"(",
"CriticalSection",
"ignored",
"=",
"criticalSection",
".",
"enter",
"(",
")",
")",
"{",
"final",
"int",
"currentThreadPermits",
"=",
"getThreadPermitsToAcquire",
... | Acquire transaction with a single permit in a thread. Transactions are acquired reentrantly, i.e.
with respect to transactions already acquired in the thread.
@return the number of acquired permits, identically equal to 1. | [
"Acquire",
"transaction",
"with",
"a",
"single",
"permit",
"in",
"a",
"thread",
".",
"Transactions",
"are",
"acquired",
"reentrantly",
"i",
".",
"e",
".",
"with",
"respect",
"to",
"transactions",
"already",
"acquired",
"in",
"the",
"thread",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/environment/src/main/java/jetbrains/exodus/env/ReentrantTransactionDispatcher.java#L68-L74 |
160,757 | JetBrains/xodus | environment/src/main/java/jetbrains/exodus/env/ReentrantTransactionDispatcher.java | ReentrantTransactionDispatcher.releaseTransaction | void releaseTransaction(@NotNull final Thread thread, final int permits) {
try (CriticalSection ignored = criticalSection.enter()) {
int currentThreadPermits = getThreadPermits(thread);
if (permits > currentThreadPermits) {
throw new ExodusException("Can't release more pe... | java | void releaseTransaction(@NotNull final Thread thread, final int permits) {
try (CriticalSection ignored = criticalSection.enter()) {
int currentThreadPermits = getThreadPermits(thread);
if (permits > currentThreadPermits) {
throw new ExodusException("Can't release more pe... | [
"void",
"releaseTransaction",
"(",
"@",
"NotNull",
"final",
"Thread",
"thread",
",",
"final",
"int",
"permits",
")",
"{",
"try",
"(",
"CriticalSection",
"ignored",
"=",
"criticalSection",
".",
"enter",
"(",
")",
")",
"{",
"int",
"currentThreadPermits",
"=",
... | Release transaction that was acquired in a thread with specified permits. | [
"Release",
"transaction",
"that",
"was",
"acquired",
"in",
"a",
"thread",
"with",
"specified",
"permits",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/environment/src/main/java/jetbrains/exodus/env/ReentrantTransactionDispatcher.java#L121-L136 |
160,758 | JetBrains/xodus | environment/src/main/java/jetbrains/exodus/env/ReentrantTransactionDispatcher.java | ReentrantTransactionDispatcher.tryAcquireExclusiveTransaction | private int tryAcquireExclusiveTransaction(@NotNull final Thread thread, final int timeout) {
long nanos = TimeUnit.MILLISECONDS.toNanos(timeout);
try (CriticalSection ignored = criticalSection.enter()) {
if (getThreadPermits(thread) > 0) {
throw new ExodusException("Exclusiv... | java | private int tryAcquireExclusiveTransaction(@NotNull final Thread thread, final int timeout) {
long nanos = TimeUnit.MILLISECONDS.toNanos(timeout);
try (CriticalSection ignored = criticalSection.enter()) {
if (getThreadPermits(thread) > 0) {
throw new ExodusException("Exclusiv... | [
"private",
"int",
"tryAcquireExclusiveTransaction",
"(",
"@",
"NotNull",
"final",
"Thread",
"thread",
",",
"final",
"int",
"timeout",
")",
"{",
"long",
"nanos",
"=",
"TimeUnit",
".",
"MILLISECONDS",
".",
"toNanos",
"(",
"timeout",
")",
";",
"try",
"(",
"Crit... | Wait for exclusive permit during a timeout in milliseconds.
@return number of acquired permits if > 0 | [
"Wait",
"for",
"exclusive",
"permit",
"during",
"a",
"timeout",
"in",
"milliseconds",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/environment/src/main/java/jetbrains/exodus/env/ReentrantTransactionDispatcher.java#L193-L223 |
160,759 | JetBrains/xodus | utils/src/main/java/jetbrains/exodus/core/execution/JobProcessorQueueAdapter.java | JobProcessorQueueAdapter.waitForJobs | protected boolean waitForJobs() throws InterruptedException {
final Pair<Long, Job> peekPair;
try (Guard ignored = timeQueue.lock()) {
peekPair = timeQueue.peekPair();
}
if (peekPair == null) {
awake.acquire();
return true;
}
final long... | java | protected boolean waitForJobs() throws InterruptedException {
final Pair<Long, Job> peekPair;
try (Guard ignored = timeQueue.lock()) {
peekPair = timeQueue.peekPair();
}
if (peekPair == null) {
awake.acquire();
return true;
}
final long... | [
"protected",
"boolean",
"waitForJobs",
"(",
")",
"throws",
"InterruptedException",
"{",
"final",
"Pair",
"<",
"Long",
",",
"Job",
">",
"peekPair",
";",
"try",
"(",
"Guard",
"ignored",
"=",
"timeQueue",
".",
"lock",
"(",
")",
")",
"{",
"peekPair",
"=",
"t... | returns true if a job was queued within a timeout | [
"returns",
"true",
"if",
"a",
"job",
"was",
"queued",
"within",
"a",
"timeout"
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/utils/src/main/java/jetbrains/exodus/core/execution/JobProcessorQueueAdapter.java#L229-L243 |
160,760 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentStoreTransaction.java | PersistentStoreTransaction.apply | void apply() {
final FlushLog log = new FlushLog();
store.logOperations(txn, log);
final BlobVault blobVault = store.getBlobVault();
if (blobVault.requiresTxn()) {
try {
blobVault.flushBlobs(blobStreams, blobFiles, deferredBlobsToDelete, txn);
} ca... | java | void apply() {
final FlushLog log = new FlushLog();
store.logOperations(txn, log);
final BlobVault blobVault = store.getBlobVault();
if (blobVault.requiresTxn()) {
try {
blobVault.flushBlobs(blobStreams, blobFiles, deferredBlobsToDelete, txn);
} ca... | [
"void",
"apply",
"(",
")",
"{",
"final",
"FlushLog",
"log",
"=",
"new",
"FlushLog",
"(",
")",
";",
"store",
".",
"logOperations",
"(",
"txn",
",",
"log",
")",
";",
"final",
"BlobVault",
"blobVault",
"=",
"store",
".",
"getBlobVault",
"(",
")",
";",
"... | exposed only for tests | [
"exposed",
"only",
"for",
"tests"
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentStoreTransaction.java#L851-L873 |
160,761 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/StoreNamingRules.java | StoreNamingRules.getFQName | @NotNull
private String getFQName(@NotNull final String localName, Object... params) {
final StringBuilder builder = new StringBuilder();
builder.append(storeName);
builder.append('.');
builder.append(localName);
for (final Object param : params) {
builder.append(... | java | @NotNull
private String getFQName(@NotNull final String localName, Object... params) {
final StringBuilder builder = new StringBuilder();
builder.append(storeName);
builder.append('.');
builder.append(localName);
for (final Object param : params) {
builder.append(... | [
"@",
"NotNull",
"private",
"String",
"getFQName",
"(",
"@",
"NotNull",
"final",
"String",
"localName",
",",
"Object",
"...",
"params",
")",
"{",
"final",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",
"append",
"(",
... | Gets fully-qualified name of a table or sequence.
@param localName local table name.
@param params params.
@return fully-qualified table name. | [
"Gets",
"fully",
"-",
"qualified",
"name",
"of",
"a",
"table",
"or",
"sequence",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/StoreNamingRules.java#L144-L156 |
160,762 | JetBrains/xodus | utils/src/main/java/jetbrains/exodus/util/UTFUtil.java | UTFUtil.writeUTF | public static void writeUTF(@NotNull final OutputStream stream, @NotNull final String str) throws IOException {
try (DataOutputStream dataStream = new DataOutputStream(stream)) {
int len = str.length();
if (len < SINGLE_UTF_CHUNK_SIZE) {
dataStream.writeUTF(str);
... | java | public static void writeUTF(@NotNull final OutputStream stream, @NotNull final String str) throws IOException {
try (DataOutputStream dataStream = new DataOutputStream(stream)) {
int len = str.length();
if (len < SINGLE_UTF_CHUNK_SIZE) {
dataStream.writeUTF(str);
... | [
"public",
"static",
"void",
"writeUTF",
"(",
"@",
"NotNull",
"final",
"OutputStream",
"stream",
",",
"@",
"NotNull",
"final",
"String",
"str",
")",
"throws",
"IOException",
"{",
"try",
"(",
"DataOutputStream",
"dataStream",
"=",
"new",
"DataOutputStream",
"(",
... | Writes long strings to output stream as several chunks.
@param stream stream to write to.
@param str string to be written.
@throws IOException if something went wrong | [
"Writes",
"long",
"strings",
"to",
"output",
"stream",
"as",
"several",
"chunks",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/utils/src/main/java/jetbrains/exodus/util/UTFUtil.java#L39-L57 |
160,763 | JetBrains/xodus | utils/src/main/java/jetbrains/exodus/util/UTFUtil.java | UTFUtil.readUTF | @Nullable
public static String readUTF(@NotNull final InputStream stream) throws IOException {
final DataInputStream dataInput = new DataInputStream(stream);
if (stream instanceof ByteArraySizedInputStream) {
final ByteArraySizedInputStream sizedStream = (ByteArraySizedInputStream) strea... | java | @Nullable
public static String readUTF(@NotNull final InputStream stream) throws IOException {
final DataInputStream dataInput = new DataInputStream(stream);
if (stream instanceof ByteArraySizedInputStream) {
final ByteArraySizedInputStream sizedStream = (ByteArraySizedInputStream) strea... | [
"@",
"Nullable",
"public",
"static",
"String",
"readUTF",
"(",
"@",
"NotNull",
"final",
"InputStream",
"stream",
")",
"throws",
"IOException",
"{",
"final",
"DataInputStream",
"dataInput",
"=",
"new",
"DataInputStream",
"(",
"stream",
")",
";",
"if",
"(",
"str... | Reads a string from input stream saved as a sequence of UTF chunks.
@param stream stream to read from.
@return output string
@throws IOException if something went wrong | [
"Reads",
"a",
"string",
"from",
"input",
"stream",
"saved",
"as",
"a",
"sequence",
"of",
"UTF",
"chunks",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/utils/src/main/java/jetbrains/exodus/util/UTFUtil.java#L66-L119 |
160,764 | JetBrains/xodus | environment/src/main/java/jetbrains/exodus/tree/btree/BasePageMutable.java | BasePageMutable.save | protected long save() {
// save leaf nodes
ReclaimFlag flag = saveChildren();
// save self. complementary to {@link load()}
final byte type = getType();
final BTreeBase tree = getTree();
final int structureId = tree.structureId;
final Log log = tree.log;
i... | java | protected long save() {
// save leaf nodes
ReclaimFlag flag = saveChildren();
// save self. complementary to {@link load()}
final byte type = getType();
final BTreeBase tree = getTree();
final int structureId = tree.structureId;
final Log log = tree.log;
i... | [
"protected",
"long",
"save",
"(",
")",
"{",
"// save leaf nodes",
"ReclaimFlag",
"flag",
"=",
"saveChildren",
"(",
")",
";",
"// save self. complementary to {@link load()}",
"final",
"byte",
"type",
"=",
"getType",
"(",
")",
";",
"final",
"BTreeBase",
"tree",
"=",... | Save page to log
@return address of this page after save | [
"Save",
"page",
"to",
"log"
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/environment/src/main/java/jetbrains/exodus/tree/btree/BasePageMutable.java#L113-L143 |
160,765 | JetBrains/xodus | openAPI/src/main/java/jetbrains/exodus/env/EnvironmentConfig.java | EnvironmentConfig.setSetting | @Override
public EnvironmentConfig setSetting(@NotNull final String key, @NotNull final Object value) {
return (EnvironmentConfig) super.setSetting(key, value);
} | java | @Override
public EnvironmentConfig setSetting(@NotNull final String key, @NotNull final Object value) {
return (EnvironmentConfig) super.setSetting(key, value);
} | [
"@",
"Override",
"public",
"EnvironmentConfig",
"setSetting",
"(",
"@",
"NotNull",
"final",
"String",
"key",
",",
"@",
"NotNull",
"final",
"Object",
"value",
")",
"{",
"return",
"(",
"EnvironmentConfig",
")",
"super",
".",
"setSetting",
"(",
"key",
",",
"val... | Sets the value of the setting with the specified key.
@param key name of the setting
@param value the setting value
@return this {@code EnvironmentConfig} instance | [
"Sets",
"the",
"value",
"of",
"the",
"setting",
"with",
"the",
"specified",
"key",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/openAPI/src/main/java/jetbrains/exodus/env/EnvironmentConfig.java#L674-L677 |
160,766 | JetBrains/xodus | openAPI/src/main/java/jetbrains/exodus/entitystore/BlobVault.java | BlobVault.getStringContent | @Nullable
public final String getStringContent(final long blobHandle, @NotNull final Transaction txn) throws IOException {
String result;
result = stringContentCache.tryKey(this, blobHandle);
if (result == null) {
final InputStream content = getContent(blobHandle, txn);
... | java | @Nullable
public final String getStringContent(final long blobHandle, @NotNull final Transaction txn) throws IOException {
String result;
result = stringContentCache.tryKey(this, blobHandle);
if (result == null) {
final InputStream content = getContent(blobHandle, txn);
... | [
"@",
"Nullable",
"public",
"final",
"String",
"getStringContent",
"(",
"final",
"long",
"blobHandle",
",",
"@",
"NotNull",
"final",
"Transaction",
"txn",
")",
"throws",
"IOException",
"{",
"String",
"result",
";",
"result",
"=",
"stringContentCache",
".",
"tryKe... | Returns string content of blob identified by specified blob handle. String contents cache is used.
@param blobHandle blob handle
@param txn {@linkplain Transaction} instance
@return string content of blob identified by specified blob handle
@throws IOException if something went wrong | [
"Returns",
"string",
"content",
"of",
"blob",
"identified",
"by",
"specified",
"blob",
"handle",
".",
"String",
"contents",
"cache",
"is",
"used",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/openAPI/src/main/java/jetbrains/exodus/entitystore/BlobVault.java#L199-L216 |
160,767 | JetBrains/xodus | utils/src/main/java/jetbrains/exodus/core/execution/JobProcessorAdapter.java | JobProcessorAdapter.queueIn | @Override
public final Job queueIn(final Job job, final long millis) {
return pushAt(job, System.currentTimeMillis() + millis);
} | java | @Override
public final Job queueIn(final Job job, final long millis) {
return pushAt(job, System.currentTimeMillis() + millis);
} | [
"@",
"Override",
"public",
"final",
"Job",
"queueIn",
"(",
"final",
"Job",
"job",
",",
"final",
"long",
"millis",
")",
"{",
"return",
"pushAt",
"(",
"job",
",",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"millis",
")",
";",
"}"
] | Queues a job for execution in specified time.
@param job the job.
@param millis execute the job in this time. | [
"Queues",
"a",
"job",
"for",
"execution",
"in",
"specified",
"time",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/utils/src/main/java/jetbrains/exodus/core/execution/JobProcessorAdapter.java#L116-L119 |
160,768 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/tables/BlobsTable.java | BlobsTable.put | public void put(@NotNull final Transaction txn, final long localId,
final int blobId, @NotNull final ByteIterable value) {
primaryStore.put(txn, PropertyKey.propertyKeyToEntry(new PropertyKey(localId, blobId)), value);
allBlobsIndex.put(txn, IntegerBinding.intToCompressedEntry(blobId... | java | public void put(@NotNull final Transaction txn, final long localId,
final int blobId, @NotNull final ByteIterable value) {
primaryStore.put(txn, PropertyKey.propertyKeyToEntry(new PropertyKey(localId, blobId)), value);
allBlobsIndex.put(txn, IntegerBinding.intToCompressedEntry(blobId... | [
"public",
"void",
"put",
"(",
"@",
"NotNull",
"final",
"Transaction",
"txn",
",",
"final",
"long",
"localId",
",",
"final",
"int",
"blobId",
",",
"@",
"NotNull",
"final",
"ByteIterable",
"value",
")",
"{",
"primaryStore",
".",
"put",
"(",
"txn",
",",
"Pr... | Setter for blob handle value.
@param txn enclosing transaction
@param localId entity local id.
@param blobId blob id
@param value property value. | [
"Setter",
"for",
"blob",
"handle",
"value",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/tables/BlobsTable.java#L62-L66 |
160,769 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/tables/PropertiesTable.java | PropertiesTable.put | public void put(@NotNull final PersistentStoreTransaction txn,
final long localId,
@NotNull final ByteIterable value,
@Nullable final ByteIterable oldValue,
final int propertyId,
@NotNull final ComparableValueType type) ... | java | public void put(@NotNull final PersistentStoreTransaction txn,
final long localId,
@NotNull final ByteIterable value,
@Nullable final ByteIterable oldValue,
final int propertyId,
@NotNull final ComparableValueType type) ... | [
"public",
"void",
"put",
"(",
"@",
"NotNull",
"final",
"PersistentStoreTransaction",
"txn",
",",
"final",
"long",
"localId",
",",
"@",
"NotNull",
"final",
"ByteIterable",
"value",
",",
"@",
"Nullable",
"final",
"ByteIterable",
"oldValue",
",",
"final",
"int",
... | Setter for property value. Doesn't affect entity version and doesn't
invalidate any of the cached entity iterables.
@param localId entity local id.
@param value property value.
@param oldValue property old value
@param propertyId property id | [
"Setter",
"for",
"property",
"value",
".",
"Doesn",
"t",
"affect",
"entity",
"version",
"and",
"doesn",
"t",
"invalidate",
"any",
"of",
"the",
"cached",
"entity",
"iterables",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/tables/PropertiesTable.java#L74-L97 |
160,770 | JetBrains/xodus | utils/src/main/java/jetbrains/exodus/core/dataStructures/persistent/AbstractPersistent23Tree.java | AbstractPersistent23Tree.tailIterator | public Iterator<K> tailIterator(@NotNull final K key) {
return new Iterator<K>() {
private Stack<TreePos<K>> stack;
private boolean hasNext;
private boolean hasNextValid;
@Override
public boolean hasNext() {
if (hasNextValid) {
... | java | public Iterator<K> tailIterator(@NotNull final K key) {
return new Iterator<K>() {
private Stack<TreePos<K>> stack;
private boolean hasNext;
private boolean hasNextValid;
@Override
public boolean hasNext() {
if (hasNextValid) {
... | [
"public",
"Iterator",
"<",
"K",
">",
"tailIterator",
"(",
"@",
"NotNull",
"final",
"K",
"key",
")",
"{",
"return",
"new",
"Iterator",
"<",
"K",
">",
"(",
")",
"{",
"private",
"Stack",
"<",
"TreePos",
"<",
"K",
">",
">",
"stack",
";",
"private",
"bo... | Returns an iterator that iterates over all elements greater or equal to key in ascending order
@param key key
@return iterator | [
"Returns",
"an",
"iterator",
"that",
"iterates",
"over",
"all",
"elements",
"greater",
"or",
"equal",
"to",
"key",
"in",
"ascending",
"order"
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/utils/src/main/java/jetbrains/exodus/core/dataStructures/persistent/AbstractPersistent23Tree.java#L146-L215 |
160,771 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/tables/TwoColumnTable.java | TwoColumnTable.get | @Nullable
public ByteIterable get(@NotNull final Transaction txn, @NotNull final ByteIterable first) {
return this.first.get(txn, first);
} | java | @Nullable
public ByteIterable get(@NotNull final Transaction txn, @NotNull final ByteIterable first) {
return this.first.get(txn, first);
} | [
"@",
"Nullable",
"public",
"ByteIterable",
"get",
"(",
"@",
"NotNull",
"final",
"Transaction",
"txn",
",",
"@",
"NotNull",
"final",
"ByteIterable",
"first",
")",
"{",
"return",
"this",
".",
"first",
".",
"get",
"(",
"txn",
",",
"first",
")",
";",
"}"
] | Search for the first entry in the first database. Use this method for databases configured with no duplicates.
@param txn enclosing transaction
@param first first key.
@return null if no entry found, otherwise the value. | [
"Search",
"for",
"the",
"first",
"entry",
"in",
"the",
"first",
"database",
".",
"Use",
"this",
"method",
"for",
"databases",
"configured",
"with",
"no",
"duplicates",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/tables/TwoColumnTable.java#L54-L57 |
160,772 | JetBrains/xodus | entity-store/src/main/java/jetbrains/exodus/entitystore/tables/TwoColumnTable.java | TwoColumnTable.get2 | @Nullable
public ByteIterable get2(@NotNull final Transaction txn, @NotNull final ByteIterable second) {
return this.second.get(txn, second);
} | java | @Nullable
public ByteIterable get2(@NotNull final Transaction txn, @NotNull final ByteIterable second) {
return this.second.get(txn, second);
} | [
"@",
"Nullable",
"public",
"ByteIterable",
"get2",
"(",
"@",
"NotNull",
"final",
"Transaction",
"txn",
",",
"@",
"NotNull",
"final",
"ByteIterable",
"second",
")",
"{",
"return",
"this",
".",
"second",
".",
"get",
"(",
"txn",
",",
"second",
")",
";",
"}"... | Search for the second entry in the second database. Use this method for databases configured with no duplicates.
@param second second key (value for first).
@return null if no entry found, otherwise the value. | [
"Search",
"for",
"the",
"second",
"entry",
"in",
"the",
"second",
"database",
".",
"Use",
"this",
"method",
"for",
"databases",
"configured",
"with",
"no",
"duplicates",
"."
] | 7b3476c4e81db66f9c7529148c761605cc8eea6d | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/tables/TwoColumnTable.java#L65-L68 |
160,773 | OpenHFT/Chronicle-Network | src/main/java/net/openhft/chronicle/network/connection/TcpChannelHub.java | TcpChannelHub.close | @Override
public void close() {
if (closed)
return;
closed = true;
tcpSocketConsumer.prepareToShutdown();
if (shouldSendCloseMessage)
eventLoop.addHandler(new EventHandler() {
@Override
public boolean action() throws InvalidEv... | java | @Override
public void close() {
if (closed)
return;
closed = true;
tcpSocketConsumer.prepareToShutdown();
if (shouldSendCloseMessage)
eventLoop.addHandler(new EventHandler() {
@Override
public boolean action() throws InvalidEv... | [
"@",
"Override",
"public",
"void",
"close",
"(",
")",
"{",
"if",
"(",
"closed",
")",
"return",
";",
"closed",
"=",
"true",
";",
"tcpSocketConsumer",
".",
"prepareToShutdown",
"(",
")",
";",
"if",
"(",
"shouldSendCloseMessage",
")",
"eventLoop",
".",
"addHa... | called when we are completed finished with using the TcpChannelHub | [
"called",
"when",
"we",
"are",
"completed",
"finished",
"with",
"using",
"the",
"TcpChannelHub"
] | b50d232a1763b1400d5438c7925dce845e5c387a | https://github.com/OpenHFT/Chronicle-Network/blob/b50d232a1763b1400d5438c7925dce845e5c387a/src/main/java/net/openhft/chronicle/network/connection/TcpChannelHub.java#L490-L529 |
160,774 | OpenHFT/Chronicle-Network | src/main/java/net/openhft/chronicle/network/connection/TcpChannelHub.java | TcpChannelHub.sendCloseMessage | private void sendCloseMessage() {
this.lock(() -> {
TcpChannelHub.this.writeMetaDataForKnownTID(0, outWire, null, 0);
TcpChannelHub.this.outWire.writeDocument(false, w ->
w.writeEventName(EventId.onClientClosing).text(""));
}, TryLock.LOCK);
// wa... | java | private void sendCloseMessage() {
this.lock(() -> {
TcpChannelHub.this.writeMetaDataForKnownTID(0, outWire, null, 0);
TcpChannelHub.this.outWire.writeDocument(false, w ->
w.writeEventName(EventId.onClientClosing).text(""));
}, TryLock.LOCK);
// wa... | [
"private",
"void",
"sendCloseMessage",
"(",
")",
"{",
"this",
".",
"lock",
"(",
"(",
")",
"->",
"{",
"TcpChannelHub",
".",
"this",
".",
"writeMetaDataForKnownTID",
"(",
"0",
",",
"outWire",
",",
"null",
",",
"0",
")",
";",
"TcpChannelHub",
".",
"this",
... | used to signal to the server that the client is going to drop the connection, and waits up to
one second for the server to acknowledge the receipt of this message | [
"used",
"to",
"signal",
"to",
"the",
"server",
"that",
"the",
"client",
"is",
"going",
"to",
"drop",
"the",
"connection",
"and",
"waits",
"up",
"to",
"one",
"second",
"for",
"the",
"server",
"to",
"acknowledge",
"the",
"receipt",
"of",
"this",
"message"
] | b50d232a1763b1400d5438c7925dce845e5c387a | https://github.com/OpenHFT/Chronicle-Network/blob/b50d232a1763b1400d5438c7925dce845e5c387a/src/main/java/net/openhft/chronicle/network/connection/TcpChannelHub.java#L535-L556 |
160,775 | OpenHFT/Chronicle-Network | src/main/java/net/openhft/chronicle/network/connection/TcpChannelHub.java | TcpChannelHub.nextUniqueTransaction | public long nextUniqueTransaction(long timeMs) {
long id = timeMs;
for (; ; ) {
long old = transactionID.get();
if (old >= id)
id = old + 1;
if (transactionID.compareAndSet(old, id))
break;
}
return id;
} | java | public long nextUniqueTransaction(long timeMs) {
long id = timeMs;
for (; ; ) {
long old = transactionID.get();
if (old >= id)
id = old + 1;
if (transactionID.compareAndSet(old, id))
break;
}
return id;
} | [
"public",
"long",
"nextUniqueTransaction",
"(",
"long",
"timeMs",
")",
"{",
"long",
"id",
"=",
"timeMs",
";",
"for",
"(",
";",
";",
")",
"{",
"long",
"old",
"=",
"transactionID",
".",
"get",
"(",
")",
";",
"if",
"(",
"old",
">=",
"id",
")",
"id",
... | the transaction id are generated as unique timestamps
@param timeMs in milliseconds
@return a unique transactionId | [
"the",
"transaction",
"id",
"are",
"generated",
"as",
"unique",
"timestamps"
] | b50d232a1763b1400d5438c7925dce845e5c387a | https://github.com/OpenHFT/Chronicle-Network/blob/b50d232a1763b1400d5438c7925dce845e5c387a/src/main/java/net/openhft/chronicle/network/connection/TcpChannelHub.java#L564-L574 |
160,776 | OpenHFT/Chronicle-Network | src/main/java/net/openhft/chronicle/network/connection/TcpChannelHub.java | TcpChannelHub.checkConnection | public void checkConnection() {
long start = Time.currentTimeMillis();
while (clientChannel == null) {
tcpSocketConsumer.checkNotShutdown();
if (start + timeoutMs > Time.currentTimeMillis())
try {
condition.await(1, TimeUnit.MILLISECONDS);
... | java | public void checkConnection() {
long start = Time.currentTimeMillis();
while (clientChannel == null) {
tcpSocketConsumer.checkNotShutdown();
if (start + timeoutMs > Time.currentTimeMillis())
try {
condition.await(1, TimeUnit.MILLISECONDS);
... | [
"public",
"void",
"checkConnection",
"(",
")",
"{",
"long",
"start",
"=",
"Time",
".",
"currentTimeMillis",
"(",
")",
";",
"while",
"(",
"clientChannel",
"==",
"null",
")",
"{",
"tcpSocketConsumer",
".",
"checkNotShutdown",
"(",
")",
";",
"if",
"(",
"start... | blocks until there is a connection | [
"blocks",
"until",
"there",
"is",
"a",
"connection"
] | b50d232a1763b1400d5438c7925dce845e5c387a | https://github.com/OpenHFT/Chronicle-Network/blob/b50d232a1763b1400d5438c7925dce845e5c387a/src/main/java/net/openhft/chronicle/network/connection/TcpChannelHub.java#L944-L964 |
160,777 | OpenHFT/Chronicle-Network | src/main/java/net/openhft/chronicle/network/VanillaNetworkContext.java | VanillaNetworkContext.closeAtomically | protected boolean closeAtomically() {
if (isClosed.compareAndSet(false, true)) {
Closeable.closeQuietly(networkStatsListener);
return true;
} else {
//was already closed.
return false;
}
} | java | protected boolean closeAtomically() {
if (isClosed.compareAndSet(false, true)) {
Closeable.closeQuietly(networkStatsListener);
return true;
} else {
//was already closed.
return false;
}
} | [
"protected",
"boolean",
"closeAtomically",
"(",
")",
"{",
"if",
"(",
"isClosed",
".",
"compareAndSet",
"(",
"false",
",",
"true",
")",
")",
"{",
"Closeable",
".",
"closeQuietly",
"(",
"networkStatsListener",
")",
";",
"return",
"true",
";",
"}",
"else",
"{... | Close the connection atomically.
@return true if state changed to closed; false if nothing changed. | [
"Close",
"the",
"connection",
"atomically",
"."
] | b50d232a1763b1400d5438c7925dce845e5c387a | https://github.com/OpenHFT/Chronicle-Network/blob/b50d232a1763b1400d5438c7925dce845e5c387a/src/main/java/net/openhft/chronicle/network/VanillaNetworkContext.java#L183-L191 |
160,778 | OpenHFT/Chronicle-Network | src/main/java/net/openhft/chronicle/network/WireTcpHandler.java | WireTcpHandler.onRead0 | private void onRead0() {
assert inWire.startUse();
ensureCapacity();
try {
while (!inWire.bytes().isEmpty()) {
try (DocumentContext dc = inWire.readingDocument()) {
if (!dc.isPresent())
return;
try {... | java | private void onRead0() {
assert inWire.startUse();
ensureCapacity();
try {
while (!inWire.bytes().isEmpty()) {
try (DocumentContext dc = inWire.readingDocument()) {
if (!dc.isPresent())
return;
try {... | [
"private",
"void",
"onRead0",
"(",
")",
"{",
"assert",
"inWire",
".",
"startUse",
"(",
")",
";",
"ensureCapacity",
"(",
")",
";",
"try",
"{",
"while",
"(",
"!",
"inWire",
".",
"bytes",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"try",
"(",
"Do... | process all messages in this batch, provided there is plenty of output space. | [
"process",
"all",
"messages",
"in",
"this",
"batch",
"provided",
"there",
"is",
"plenty",
"of",
"output",
"space",
"."
] | b50d232a1763b1400d5438c7925dce845e5c387a | https://github.com/OpenHFT/Chronicle-Network/blob/b50d232a1763b1400d5438c7925dce845e5c387a/src/main/java/net/openhft/chronicle/network/WireTcpHandler.java#L188-L215 |
160,779 | OpenHFT/Chronicle-Network | src/main/java/net/openhft/chronicle/network/cluster/handlers/HeartbeatHandler.java | HeartbeatHandler.hasReceivedHeartbeat | private boolean hasReceivedHeartbeat() {
long currentTimeMillis = System.currentTimeMillis();
boolean result = lastTimeMessageReceived + heartbeatTimeoutMs >= currentTimeMillis;
if (!result)
Jvm.warn().on(getClass(), Integer.toHexString(hashCode()) + " missed heartbeat, lastTimeMess... | java | private boolean hasReceivedHeartbeat() {
long currentTimeMillis = System.currentTimeMillis();
boolean result = lastTimeMessageReceived + heartbeatTimeoutMs >= currentTimeMillis;
if (!result)
Jvm.warn().on(getClass(), Integer.toHexString(hashCode()) + " missed heartbeat, lastTimeMess... | [
"private",
"boolean",
"hasReceivedHeartbeat",
"(",
")",
"{",
"long",
"currentTimeMillis",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"boolean",
"result",
"=",
"lastTimeMessageReceived",
"+",
"heartbeatTimeoutMs",
">=",
"currentTimeMillis",
";",
"if",
"(... | called periodically to check that the heartbeat has been received
@return {@code true} if we have received a heartbeat recently | [
"called",
"periodically",
"to",
"check",
"that",
"the",
"heartbeat",
"has",
"been",
"received"
] | b50d232a1763b1400d5438c7925dce845e5c387a | https://github.com/OpenHFT/Chronicle-Network/blob/b50d232a1763b1400d5438c7925dce845e5c387a/src/main/java/net/openhft/chronicle/network/cluster/handlers/HeartbeatHandler.java#L185-L193 |
160,780 | Stratio/cassandra-lucene-index | plugin/src/main/java/com/stratio/cassandra/lucene/schema/mapping/Mapper.java | Mapper.mapsCell | public boolean mapsCell(String cell) {
return mappedCells.stream().anyMatch(x -> x.equals(cell));
} | java | public boolean mapsCell(String cell) {
return mappedCells.stream().anyMatch(x -> x.equals(cell));
} | [
"public",
"boolean",
"mapsCell",
"(",
"String",
"cell",
")",
"{",
"return",
"mappedCells",
".",
"stream",
"(",
")",
".",
"anyMatch",
"(",
"x",
"->",
"x",
".",
"equals",
"(",
"cell",
")",
")",
";",
"}"
] | Returns if this maps the specified cell.
@param cell the cell name
@return {@code true} if this maps the column, {@code false} otherwise | [
"Returns",
"if",
"this",
"maps",
"the",
"specified",
"cell",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/schema/mapping/Mapper.java#L192-L194 |
160,781 | Stratio/cassandra-lucene-index | plugin/src/main/java/com/stratio/cassandra/lucene/common/GeoDistance.java | GeoDistance.getDegrees | public double getDegrees() {
double kms = getValue(GeoDistanceUnit.KILOMETRES);
return DistanceUtils.dist2Degrees(kms, DistanceUtils.EARTH_MEAN_RADIUS_KM);
} | java | public double getDegrees() {
double kms = getValue(GeoDistanceUnit.KILOMETRES);
return DistanceUtils.dist2Degrees(kms, DistanceUtils.EARTH_MEAN_RADIUS_KM);
} | [
"public",
"double",
"getDegrees",
"(",
")",
"{",
"double",
"kms",
"=",
"getValue",
"(",
"GeoDistanceUnit",
".",
"KILOMETRES",
")",
";",
"return",
"DistanceUtils",
".",
"dist2Degrees",
"(",
"kms",
",",
"DistanceUtils",
".",
"EARTH_MEAN_RADIUS_KM",
")",
";",
"}"... | Return the numeric distance value in degrees.
@return the degrees | [
"Return",
"the",
"numeric",
"distance",
"value",
"in",
"degrees",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/common/GeoDistance.java#L62-L65 |
160,782 | Stratio/cassandra-lucene-index | plugin/src/main/java/com/stratio/cassandra/lucene/schema/mapping/DateRangeMapper.java | DateRangeMapper.makeShape | public NRShape makeShape(Date from, Date to) {
UnitNRShape fromShape = tree.toUnitShape(from);
UnitNRShape toShape = tree.toUnitShape(to);
return tree.toRangeShape(fromShape, toShape);
} | java | public NRShape makeShape(Date from, Date to) {
UnitNRShape fromShape = tree.toUnitShape(from);
UnitNRShape toShape = tree.toUnitShape(to);
return tree.toRangeShape(fromShape, toShape);
} | [
"public",
"NRShape",
"makeShape",
"(",
"Date",
"from",
",",
"Date",
"to",
")",
"{",
"UnitNRShape",
"fromShape",
"=",
"tree",
".",
"toUnitShape",
"(",
"from",
")",
";",
"UnitNRShape",
"toShape",
"=",
"tree",
".",
"toUnitShape",
"(",
"to",
")",
";",
"retur... | Makes an spatial shape representing the time range defined by the two specified dates.
@param from the start {@link Date}
@param to the end {@link Date}
@return a shape | [
"Makes",
"an",
"spatial",
"shape",
"representing",
"the",
"time",
"range",
"defined",
"by",
"the",
"two",
"specified",
"dates",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/schema/mapping/DateRangeMapper.java#L123-L127 |
160,783 | Stratio/cassandra-lucene-index | plugin/src/main/java/com/stratio/cassandra/lucene/common/GeospatialUtils.java | GeospatialUtils.validateGeohashMaxLevels | public static int validateGeohashMaxLevels(Integer userMaxLevels, int defaultMaxLevels) {
int maxLevels = userMaxLevels == null ? defaultMaxLevels : userMaxLevels;
if (maxLevels < 1 || maxLevels > GeohashPrefixTree.getMaxLevelsPossible()) {
throw new IndexException("max_levels must be in ran... | java | public static int validateGeohashMaxLevels(Integer userMaxLevels, int defaultMaxLevels) {
int maxLevels = userMaxLevels == null ? defaultMaxLevels : userMaxLevels;
if (maxLevels < 1 || maxLevels > GeohashPrefixTree.getMaxLevelsPossible()) {
throw new IndexException("max_levels must be in ran... | [
"public",
"static",
"int",
"validateGeohashMaxLevels",
"(",
"Integer",
"userMaxLevels",
",",
"int",
"defaultMaxLevels",
")",
"{",
"int",
"maxLevels",
"=",
"userMaxLevels",
"==",
"null",
"?",
"defaultMaxLevels",
":",
"userMaxLevels",
";",
"if",
"(",
"maxLevels",
"<... | Checks if the specified max levels is correct.
@param userMaxLevels the maximum number of levels in the tree
@param defaultMaxLevels the default max number of levels
@return the validated max levels | [
"Checks",
"if",
"the",
"specified",
"max",
"levels",
"is",
"correct",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/common/GeospatialUtils.java#L51-L59 |
160,784 | Stratio/cassandra-lucene-index | plugin/src/main/java/com/stratio/cassandra/lucene/common/GeospatialUtils.java | GeospatialUtils.checkLatitude | public static Double checkLatitude(String name, Double latitude) {
if (latitude == null) {
throw new IndexException("{} required", name);
} else if (latitude < MIN_LATITUDE || latitude > MAX_LATITUDE) {
throw new IndexException("{} must be in range [{}, {}], but found {}",
... | java | public static Double checkLatitude(String name, Double latitude) {
if (latitude == null) {
throw new IndexException("{} required", name);
} else if (latitude < MIN_LATITUDE || latitude > MAX_LATITUDE) {
throw new IndexException("{} must be in range [{}, {}], but found {}",
... | [
"public",
"static",
"Double",
"checkLatitude",
"(",
"String",
"name",
",",
"Double",
"latitude",
")",
"{",
"if",
"(",
"latitude",
"==",
"null",
")",
"{",
"throw",
"new",
"IndexException",
"(",
"\"{} required\"",
",",
"name",
")",
";",
"}",
"else",
"if",
... | Checks if the specified latitude is correct.
@param name the name of the latitude field
@param latitude the value of the latitude field
@return the latitude | [
"Checks",
"if",
"the",
"specified",
"latitude",
"is",
"correct",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/common/GeospatialUtils.java#L68-L79 |
160,785 | Stratio/cassandra-lucene-index | plugin/src/main/java/com/stratio/cassandra/lucene/common/GeospatialUtils.java | GeospatialUtils.checkLongitude | public static Double checkLongitude(String name, Double longitude) {
if (longitude == null) {
throw new IndexException("{} required", name);
} else if (longitude < MIN_LONGITUDE || longitude > MAX_LONGITUDE) {
throw new IndexException("{} must be in range [{}, {}], but found {}",... | java | public static Double checkLongitude(String name, Double longitude) {
if (longitude == null) {
throw new IndexException("{} required", name);
} else if (longitude < MIN_LONGITUDE || longitude > MAX_LONGITUDE) {
throw new IndexException("{} must be in range [{}, {}], but found {}",... | [
"public",
"static",
"Double",
"checkLongitude",
"(",
"String",
"name",
",",
"Double",
"longitude",
")",
"{",
"if",
"(",
"longitude",
"==",
"null",
")",
"{",
"throw",
"new",
"IndexException",
"(",
"\"{} required\"",
",",
"name",
")",
";",
"}",
"else",
"if",... | Checks if the specified longitude is correct.
@param name the name of the longitude field
@param longitude the value of the longitude field
@return the longitude | [
"Checks",
"if",
"the",
"specified",
"longitude",
"is",
"correct",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/common/GeospatialUtils.java#L88-L99 |
160,786 | Stratio/cassandra-lucene-index | plugin/src/main/java/com/stratio/cassandra/lucene/search/Search.java | Search.postProcessingFields | public Set<String> postProcessingFields() {
Set<String> fields = new LinkedHashSet<>();
query.forEach(condition -> fields.addAll(condition.postProcessingFields()));
sort.forEach(condition -> fields.addAll(condition.postProcessingFields()));
return fields;
} | java | public Set<String> postProcessingFields() {
Set<String> fields = new LinkedHashSet<>();
query.forEach(condition -> fields.addAll(condition.postProcessingFields()));
sort.forEach(condition -> fields.addAll(condition.postProcessingFields()));
return fields;
} | [
"public",
"Set",
"<",
"String",
">",
"postProcessingFields",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"fields",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
";",
"query",
".",
"forEach",
"(",
"condition",
"->",
"fields",
".",
"addAll",
"(",
"condition",... | Returns the names of the involved fields when post processing.
@return the names of the involved fields | [
"Returns",
"the",
"names",
"of",
"the",
"involved",
"fields",
"when",
"post",
"processing",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/search/Search.java#L189-L194 |
160,787 | Stratio/cassandra-lucene-index | builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java | Builder.index | public static Index index(String keyspace, String table, String name) {
return new Index(table, name).keyspace(keyspace);
} | java | public static Index index(String keyspace, String table, String name) {
return new Index(table, name).keyspace(keyspace);
} | [
"public",
"static",
"Index",
"index",
"(",
"String",
"keyspace",
",",
"String",
"table",
",",
"String",
"name",
")",
"{",
"return",
"new",
"Index",
"(",
"table",
",",
"name",
")",
".",
"keyspace",
"(",
"keyspace",
")",
";",
"}"
] | Returns a new index creation statement using the session's keyspace.
@param keyspace the keyspace name
@param table the table name
@param name the index name
@return a new index creation statement | [
"Returns",
"a",
"new",
"index",
"creation",
"statement",
"using",
"the",
"session",
"s",
"keyspace",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java#L61-L63 |
160,788 | Stratio/cassandra-lucene-index | builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/mapping/GeoShapeMapper.java | GeoShapeMapper.transform | public GeoShapeMapper transform(GeoTransformation... transformations) {
if (this.transformations == null) {
this.transformations = Arrays.asList(transformations);
} else {
this.transformations.addAll(Arrays.asList(transformations));
}
return this;
} | java | public GeoShapeMapper transform(GeoTransformation... transformations) {
if (this.transformations == null) {
this.transformations = Arrays.asList(transformations);
} else {
this.transformations.addAll(Arrays.asList(transformations));
}
return this;
} | [
"public",
"GeoShapeMapper",
"transform",
"(",
"GeoTransformation",
"...",
"transformations",
")",
"{",
"if",
"(",
"this",
".",
"transformations",
"==",
"null",
")",
"{",
"this",
".",
"transformations",
"=",
"Arrays",
".",
"asList",
"(",
"transformations",
")",
... | Sets the transformations to be applied to the shape before indexing it.
@param transformations the sequence of transformations
@return this with the specified sequence of transformations | [
"Sets",
"the",
"transformations",
"to",
"be",
"applied",
"to",
"the",
"shape",
"before",
"indexing",
"it",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/mapping/GeoShapeMapper.java#L74-L81 |
160,789 | Stratio/cassandra-lucene-index | plugin/src/main/java/com/stratio/cassandra/lucene/search/SearchBuilderLegacy.java | SearchBuilderLegacy.paging | @JsonProperty("paging")
void paging(String paging) {
builder.paging(IndexPagingState.fromByteBuffer(ByteBufferUtils.byteBuffer(paging)));
} | java | @JsonProperty("paging")
void paging(String paging) {
builder.paging(IndexPagingState.fromByteBuffer(ByteBufferUtils.byteBuffer(paging)));
} | [
"@",
"JsonProperty",
"(",
"\"paging\"",
")",
"void",
"paging",
"(",
"String",
"paging",
")",
"{",
"builder",
".",
"paging",
"(",
"IndexPagingState",
".",
"fromByteBuffer",
"(",
"ByteBufferUtils",
".",
"byteBuffer",
"(",
"paging",
")",
")",
")",
";",
"}"
] | Sets the specified starting partition key.
@param paging a paging state | [
"Sets",
"the",
"specified",
"starting",
"partition",
"key",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/search/SearchBuilderLegacy.java#L86-L89 |
160,790 | Stratio/cassandra-lucene-index | plugin/src/main/java/com/stratio/cassandra/lucene/schema/Schema.java | Schema.mapsCell | public boolean mapsCell(String cell) {
return mappers.values().stream().anyMatch(mapper -> mapper.mapsCell(cell));
} | java | public boolean mapsCell(String cell) {
return mappers.values().stream().anyMatch(mapper -> mapper.mapsCell(cell));
} | [
"public",
"boolean",
"mapsCell",
"(",
"String",
"cell",
")",
"{",
"return",
"mappers",
".",
"values",
"(",
")",
".",
"stream",
"(",
")",
".",
"anyMatch",
"(",
"mapper",
"->",
"mapper",
".",
"mapsCell",
"(",
"cell",
")",
")",
";",
"}"
] | Returns if this has any mapping for the specified cell.
@param cell the cell name
@return {@code true} if there is any mapping for the cell, {@code false} otherwise | [
"Returns",
"if",
"this",
"has",
"any",
"mapping",
"for",
"the",
"specified",
"cell",
"."
] | a94a4d9af6c25d40e1108729974c35c27c54441c | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/schema/Schema.java#L150-L152 |
160,791 | dlew/joda-time-android | library/src/main/java/net/danlew/android/joda/ResUtils.java | ResUtils.convertPathToResource | private static String convertPathToResource(String path) {
File file = new File(path);
List<String> parts = new ArrayList<String>();
do {
parts.add(file.getName());
file = file.getParentFile();
}
while (file != null);
StringBuffer sb = new StringB... | java | private static String convertPathToResource(String path) {
File file = new File(path);
List<String> parts = new ArrayList<String>();
do {
parts.add(file.getName());
file = file.getParentFile();
}
while (file != null);
StringBuffer sb = new StringB... | [
"private",
"static",
"String",
"convertPathToResource",
"(",
"String",
"path",
")",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"path",
")",
";",
"List",
"<",
"String",
">",
"parts",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"do",
... | Converts any path into something that can be placed in an Android directory.
Traverses any subdirectories and flattens it all into a single filename. Also
gets rid of commonly seen illegal characters in tz identifiers, and lower cases
the entire thing.
@param path the path to convert
@return a flat path with no dire... | [
"Converts",
"any",
"path",
"into",
"something",
"that",
"can",
"be",
"placed",
"in",
"an",
"Android",
"directory",
"."
] | 5bf96f6ef4ea63ee91e73e1e528896fa00108dec | https://github.com/dlew/joda-time-android/blob/5bf96f6ef4ea63ee91e73e1e528896fa00108dec/library/src/main/java/net/danlew/android/joda/ResUtils.java#L31-L51 |
160,792 | dlew/joda-time-android | library/src/main/java/net/danlew/android/joda/DateUtils.java | DateUtils.formatDateTime | public static String formatDateTime(Context context, ReadablePartial time, int flags) {
return android.text.format.DateUtils.formatDateTime(context, toMillis(time), flags | FORMAT_UTC);
} | java | public static String formatDateTime(Context context, ReadablePartial time, int flags) {
return android.text.format.DateUtils.formatDateTime(context, toMillis(time), flags | FORMAT_UTC);
} | [
"public",
"static",
"String",
"formatDateTime",
"(",
"Context",
"context",
",",
"ReadablePartial",
"time",
",",
"int",
"flags",
")",
"{",
"return",
"android",
".",
"text",
".",
"format",
".",
"DateUtils",
".",
"formatDateTime",
"(",
"context",
",",
"toMillis",... | Formats a date or a time according to the local conventions.
Since ReadablePartials don't support all fields, we fill in any blanks
needed for formatting by using the epoch (1970-01-01T00:00:00Z).
See {@link android.text.format.DateUtils#formatDateTime} for full docs.
@param context the context is required only if t... | [
"Formats",
"a",
"date",
"or",
"a",
"time",
"according",
"to",
"the",
"local",
"conventions",
"."
] | 5bf96f6ef4ea63ee91e73e1e528896fa00108dec | https://github.com/dlew/joda-time-android/blob/5bf96f6ef4ea63ee91e73e1e528896fa00108dec/library/src/main/java/net/danlew/android/joda/DateUtils.java#L79-L81 |
160,793 | dlew/joda-time-android | library/src/main/java/net/danlew/android/joda/DateUtils.java | DateUtils.formatDateRange | public static String formatDateRange(Context context, ReadablePartial start, ReadablePartial end, int flags) {
return formatDateRange(context, toMillis(start), toMillis(end), flags);
} | java | public static String formatDateRange(Context context, ReadablePartial start, ReadablePartial end, int flags) {
return formatDateRange(context, toMillis(start), toMillis(end), flags);
} | [
"public",
"static",
"String",
"formatDateRange",
"(",
"Context",
"context",
",",
"ReadablePartial",
"start",
",",
"ReadablePartial",
"end",
",",
"int",
"flags",
")",
"{",
"return",
"formatDateRange",
"(",
"context",
",",
"toMillis",
"(",
"start",
")",
",",
"to... | Formats a date or a time range according to the local conventions.
You should ensure that start/end are in the same timezone; formatDateRange()
doesn't handle start/end in different timezones well.
See {@link android.text.format.DateUtils#formatDateRange} for full docs.
@param context the context is required only if... | [
"Formats",
"a",
"date",
"or",
"a",
"time",
"range",
"according",
"to",
"the",
"local",
"conventions",
"."
] | 5bf96f6ef4ea63ee91e73e1e528896fa00108dec | https://github.com/dlew/joda-time-android/blob/5bf96f6ef4ea63ee91e73e1e528896fa00108dec/library/src/main/java/net/danlew/android/joda/DateUtils.java#L111-L113 |
160,794 | dlew/joda-time-android | library/src/main/java/net/danlew/android/joda/DateUtils.java | DateUtils.getRelativeTimeSpanString | public static CharSequence getRelativeTimeSpanString(Context context, ReadableInstant time, int flags) {
boolean abbrevRelative = (flags & (FORMAT_ABBREV_RELATIVE | FORMAT_ABBREV_ALL)) != 0;
// We set the millis to 0 so we aren't off by a fraction of a second when counting intervals
DateTime no... | java | public static CharSequence getRelativeTimeSpanString(Context context, ReadableInstant time, int flags) {
boolean abbrevRelative = (flags & (FORMAT_ABBREV_RELATIVE | FORMAT_ABBREV_ALL)) != 0;
// We set the millis to 0 so we aren't off by a fraction of a second when counting intervals
DateTime no... | [
"public",
"static",
"CharSequence",
"getRelativeTimeSpanString",
"(",
"Context",
"context",
",",
"ReadableInstant",
"time",
",",
"int",
"flags",
")",
"{",
"boolean",
"abbrevRelative",
"=",
"(",
"flags",
"&",
"(",
"FORMAT_ABBREV_RELATIVE",
"|",
"FORMAT_ABBREV_ALL",
"... | Returns a string describing 'time' as a time relative to 'now'.
See {@link android.text.format.DateUtils#getRelativeTimeSpanString} for full docs.
@param context the context
@param time the time to describe
@param flags a bit mask for formatting options, usually FORMAT_ABBREV_RELATIVE
@return a string describing 'tim... | [
"Returns",
"a",
"string",
"describing",
"time",
"as",
"a",
"time",
"relative",
"to",
"now",
"."
] | 5bf96f6ef4ea63ee91e73e1e528896fa00108dec | https://github.com/dlew/joda-time-android/blob/5bf96f6ef4ea63ee91e73e1e528896fa00108dec/library/src/main/java/net/danlew/android/joda/DateUtils.java#L246-L339 |
160,795 | dlew/joda-time-android | library/src/main/java/net/danlew/android/joda/DateUtils.java | DateUtils.formatDuration | public static CharSequence formatDuration(Context context, ReadableDuration readableDuration) {
Resources res = context.getResources();
Duration duration = readableDuration.toDuration();
final int hours = (int) duration.getStandardHours();
if (hours != 0) {
return res.getQua... | java | public static CharSequence formatDuration(Context context, ReadableDuration readableDuration) {
Resources res = context.getResources();
Duration duration = readableDuration.toDuration();
final int hours = (int) duration.getStandardHours();
if (hours != 0) {
return res.getQua... | [
"public",
"static",
"CharSequence",
"formatDuration",
"(",
"Context",
"context",
",",
"ReadableDuration",
"readableDuration",
")",
"{",
"Resources",
"res",
"=",
"context",
".",
"getResources",
"(",
")",
";",
"Duration",
"duration",
"=",
"readableDuration",
".",
"t... | Return given duration in a human-friendly format. For example, "4
minutes" or "1 second". Returns only largest meaningful unit of time,
from seconds up to hours.
The longest duration it supports is hours.
This method assumes that there are 60 minutes in an hour,
60 seconds in a minute and 1000 milliseconds in a secon... | [
"Return",
"given",
"duration",
"in",
"a",
"human",
"-",
"friendly",
"format",
".",
"For",
"example",
"4",
"minutes",
"or",
"1",
"second",
".",
"Returns",
"only",
"largest",
"meaningful",
"unit",
"of",
"time",
"from",
"seconds",
"up",
"to",
"hours",
"."
] | 5bf96f6ef4ea63ee91e73e1e528896fa00108dec | https://github.com/dlew/joda-time-android/blob/5bf96f6ef4ea63ee91e73e1e528896fa00108dec/library/src/main/java/net/danlew/android/joda/DateUtils.java#L489-L505 |
160,796 | dlew/joda-time-android | library/src/main/java/net/danlew/android/joda/ResourceZoneInfoProvider.java | ResourceZoneInfoProvider.getZone | public DateTimeZone getZone(String id) {
if (id == null) {
return null;
}
Object obj = iZoneInfoMap.get(id);
if (obj == null) {
return null;
}
if (id.equals(obj)) {
// Load zone data for the first time.
return loadZoneData... | java | public DateTimeZone getZone(String id) {
if (id == null) {
return null;
}
Object obj = iZoneInfoMap.get(id);
if (obj == null) {
return null;
}
if (id.equals(obj)) {
// Load zone data for the first time.
return loadZoneData... | [
"public",
"DateTimeZone",
"getZone",
"(",
"String",
"id",
")",
"{",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Object",
"obj",
"=",
"iZoneInfoMap",
".",
"get",
"(",
"id",
")",
";",
"if",
"(",
"obj",
"==",
"null",
")",
"... | If an error is thrown while loading zone data, the exception is logged
to system error and null is returned for this and all future requests.
@param id the id to load
@return the loaded zone | [
"If",
"an",
"error",
"is",
"thrown",
"while",
"loading",
"zone",
"data",
"the",
"exception",
"is",
"logged",
"to",
"system",
"error",
"and",
"null",
"is",
"returned",
"for",
"this",
"and",
"all",
"future",
"requests",
"."
] | 5bf96f6ef4ea63ee91e73e1e528896fa00108dec | https://github.com/dlew/joda-time-android/blob/5bf96f6ef4ea63ee91e73e1e528896fa00108dec/library/src/main/java/net/danlew/android/joda/ResourceZoneInfoProvider.java#L49-L77 |
160,797 | kiegroup/jbpm-designer | jbpm-designer-client/src/main/java/org/jbpm/designer/client/notification/DesignerNotificationPopupsManager.java | DesignerNotificationPopupsManager.addNotification | public void addNotification(@Observes final DesignerNotificationEvent event) {
if (user.getIdentifier().equals(event.getUserId())) {
if (event.getNotification() != null && !event.getNotification().equals("openinxmleditor")) {
final NotificationPopupView view = new NotificationPopupV... | java | public void addNotification(@Observes final DesignerNotificationEvent event) {
if (user.getIdentifier().equals(event.getUserId())) {
if (event.getNotification() != null && !event.getNotification().equals("openinxmleditor")) {
final NotificationPopupView view = new NotificationPopupV... | [
"public",
"void",
"addNotification",
"(",
"@",
"Observes",
"final",
"DesignerNotificationEvent",
"event",
")",
"{",
"if",
"(",
"user",
".",
"getIdentifier",
"(",
")",
".",
"equals",
"(",
"event",
".",
"getUserId",
"(",
")",
")",
")",
"{",
"if",
"(",
"eve... | Display a Notification message
@param event | [
"Display",
"a",
"Notification",
"message"
] | 97b048d06f083a1f831c971c2e9fdfd0952d2b0b | https://github.com/kiegroup/jbpm-designer/blob/97b048d06f083a1f831c971c2e9fdfd0952d2b0b/jbpm-designer-client/src/main/java/org/jbpm/designer/client/notification/DesignerNotificationPopupsManager.java#L51-L74 |
160,798 | kiegroup/jbpm-designer | jbpm-designer-client/src/main/java/org/jbpm/designer/client/notification/DesignerNotificationPopupsManager.java | DesignerNotificationPopupsManager.remove | private void remove() {
if (removing) {
return;
}
if (deactiveNotifications.size() == 0) {
return;
}
removing = true;
final NotificationPopupView view = deactiveNotifications.get(0);
final LinearFadeOutAnimation fadeOutAnimation = new Linea... | java | private void remove() {
if (removing) {
return;
}
if (deactiveNotifications.size() == 0) {
return;
}
removing = true;
final NotificationPopupView view = deactiveNotifications.get(0);
final LinearFadeOutAnimation fadeOutAnimation = new Linea... | [
"private",
"void",
"remove",
"(",
")",
"{",
"if",
"(",
"removing",
")",
"{",
"return",
";",
"}",
"if",
"(",
"deactiveNotifications",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"removing",
"=",
"true",
";",
"final",
"NotificationP... | Remove a notification message. Recursive until all pending removals have been completed. | [
"Remove",
"a",
"notification",
"message",
".",
"Recursive",
"until",
"all",
"pending",
"removals",
"have",
"been",
"completed",
"."
] | 97b048d06f083a1f831c971c2e9fdfd0952d2b0b | https://github.com/kiegroup/jbpm-designer/blob/97b048d06f083a1f831c971c2e9fdfd0952d2b0b/jbpm-designer-client/src/main/java/org/jbpm/designer/client/notification/DesignerNotificationPopupsManager.java#L87-L121 |
160,799 | kiegroup/jbpm-designer | jbpm-designer-backend/src/main/java/org/jbpm/designer/server/EditorHandler.java | EditorHandler.readDesignerVersion | public static String readDesignerVersion(ServletContext context) {
String retStr = "";
BufferedReader br = null;
try {
InputStream inputStream = context.getResourceAsStream("/META-INF/MANIFEST.MF");
br = new BufferedReader(new InputStreamReader(inputStream,
... | java | public static String readDesignerVersion(ServletContext context) {
String retStr = "";
BufferedReader br = null;
try {
InputStream inputStream = context.getResourceAsStream("/META-INF/MANIFEST.MF");
br = new BufferedReader(new InputStreamReader(inputStream,
... | [
"public",
"static",
"String",
"readDesignerVersion",
"(",
"ServletContext",
"context",
")",
"{",
"String",
"retStr",
"=",
"\"\"",
";",
"BufferedReader",
"br",
"=",
"null",
";",
"try",
"{",
"InputStream",
"inputStream",
"=",
"context",
".",
"getResourceAsStream",
... | Returns the designer version from the manifest.
@param context
@return version | [
"Returns",
"the",
"designer",
"version",
"from",
"the",
"manifest",
"."
] | 97b048d06f083a1f831c971c2e9fdfd0952d2b0b | https://github.com/kiegroup/jbpm-designer/blob/97b048d06f083a1f831c971c2e9fdfd0952d2b0b/jbpm-designer-backend/src/main/java/org/jbpm/designer/server/EditorHandler.java#L476-L500 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.