当前位置: 首页>>代码示例>>Java>>正文


Java DatastoreTransaction类代码示例

本文整理汇总了Java中com.buschmais.xo.spi.datastore.DatastoreTransaction的典型用法代码示例。如果您正苦于以下问题:Java DatastoreTransaction类的具体用法?Java DatastoreTransaction怎么用?Java DatastoreTransaction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DatastoreTransaction类属于com.buschmais.xo.spi.datastore包,在下文中一共展示了DatastoreTransaction类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.buschmais.xo.spi.datastore.DatastoreTransaction; //导入依赖的package包/类
@Override
public void init(Map<Class<?>, TypeMetadata> registeredMetadata) {
    try (DS session = createSession()) {
        DatastoreTransaction transaction = session.getDatastoreTransaction();
        transaction.begin();
        try {
            for (TypeMetadata typeMetadata : registeredMetadata.values()) {
                if (typeMetadata instanceof EntityTypeMetadata) {
                    EntityTypeMetadata<NodeMetadata<L>> entityTypeMetadata = (EntityTypeMetadata<NodeMetadata<L>>) typeMetadata;
                    // check for indexed property declared in type
                    ensureIndex(session, entityTypeMetadata, entityTypeMetadata.getIndexedProperty());
                    ensureIndex(session, entityTypeMetadata, entityTypeMetadata.getDatastoreMetadata().getUsingIndexedPropertyOf());
                }
            }
        } finally {
            transaction.commit();
        }
    }
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:20,代码来源:AbstractNeo4jDatastore.java

示例2: SessionContext

import com.buschmais.xo.spi.datastore.DatastoreTransaction; //导入依赖的package包/类
public SessionContext(MetadataProvider<EntityMetadata, EntityDiscriminator, RelationMetadata, RelationDiscriminator> metadataProvider, PluginRepositoryManager pluginRepositoryManager, DatastoreSession<EntityId, Entity, EntityMetadata, EntityDiscriminator, RelationId, Relation, RelationMetadata, RelationDiscriminator, PropertyMetadata> datastoreSession, ValidatorFactory validatorFactory, List<? extends Class<?>> instanceListenerTypes, TransactionAttribute defaultTransactionAttribute, ValidationMode validationMode, ConcurrencyMode concurrencyMode, ClassLoader classLoader) {
    this.metadataProvider = metadataProvider;
    this.pluginRepositoryManager = pluginRepositoryManager;
    this.datastoreSession = datastoreSession;
    this.entityCache = new TransactionalCache<>();
    this.relationCache = new TransactionalCache<>();
    DatastoreTransaction datastoreTransaction = datastoreSession.getDatastoreTransaction();
    this.xoTransaction = datastoreTransaction != null ? new XOTransactionImpl(datastoreTransaction) : null;
    List<XOInterceptor> interceptorChain = new ArrayList<>();
    interceptorChain.add(new ConcurrencyInterceptor(concurrencyMode));
    interceptorChain.add(new TransactionInterceptor(xoTransaction, defaultTransactionAttribute));
    this.interceptorFactory = new InterceptorFactory(interceptorChain);
    this.proxyFactory = new ProxyFactory(interceptorFactory, classLoader);
    this.instanceListenerService = new InstanceListenerService(instanceListenerTypes);
    this.entityPropertyManager = new EntityPropertyManager<>(this);
    this.relationPropertyManager = new RelationPropertyManager<>(this);
    this.relationInstanceManager = new RelationInstanceManager<>(this);
    this.entityInstanceManager = new EntityInstanceManager<>(this);
    this.instanceValidationService = new InstanceValidationService(validatorFactory, relationCache, entityCache);
    this.cacheSynchronizationService = new CacheSynchronizationService<>(this, validationMode);
    if (xoTransaction != null) {
        // Register default synchronizations.
        xoTransaction.registerDefaultSynchronization(new CacheSynchronization<>(cacheSynchronizationService, entityCache, relationCache));
    }
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:26,代码来源:SessionContext.java

示例3: getDatastoreTransaction

import com.buschmais.xo.spi.datastore.DatastoreTransaction; //导入依赖的package包/类
@Override
   public DatastoreTransaction getDatastoreTransaction() {
return transaction;
   }
 
开发者ID:PureSolTechnologies,项目名称:DuctileDB,代码行数:5,代码来源:DuctileStoreSession.java

示例4: getDatastoreTransaction

import com.buschmais.xo.spi.datastore.DatastoreTransaction; //导入依赖的package包/类
@Override
public DatastoreTransaction getDatastoreTransaction() {
    return datastoreTransaction;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:5,代码来源:EmbeddedNeo4jDatastoreSession.java

示例5: getDatastoreTransaction

import com.buschmais.xo.spi.datastore.DatastoreTransaction; //导入依赖的package包/类
@Override
public DatastoreTransaction getDatastoreTransaction() {
    return transaction;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:5,代码来源:RemoteDatastoreSession.java

示例6: XOTransactionImpl

import com.buschmais.xo.spi.datastore.DatastoreTransaction; //导入依赖的package包/类
public XOTransactionImpl(DatastoreTransaction datastoreTransaction) {
    this.datastoreTransaction = datastoreTransaction;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:4,代码来源:XOTransactionImpl.java

示例7: TraceTransaction

import com.buschmais.xo.spi.datastore.DatastoreTransaction; //导入依赖的package包/类
public TraceTransaction(DatastoreTransaction delegate) {
    this.delegate = delegate;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:4,代码来源:TraceTransaction.java


注:本文中的com.buschmais.xo.spi.datastore.DatastoreTransaction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。