Java Code Examples for javax.inject.Provider

The following examples show how to use javax.inject.Provider. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
public TransactionMap(
    Map<KEY, VALUE> mapRef,
    MapDatabaseDriver<KEY, VALUE> driver,
    Provider<TransactionMgr> transMgrProviderRef
)
{
    super(transMgrProviderRef);
    map = mapRef;
    if (driver == null)
    {
        dbDriver = new NoOpMapDatabaseDriver<>();
    }
    else
    {
        dbDriver = driver;
    }

    oldValues = new HashMap<>();
}
 
Example 2
@Inject
public IntFullSyncResponse(
    ScopeRunner scopeRunnerRef,
    @Named(CoreModule.NODES_MAP_LOCK) ReadWriteLock nodesMapLockRef,
    @Named(CoreModule.STOR_POOL_DFN_MAP_LOCK) ReadWriteLock storPoolDfnMapLockRef,
    StorPoolInternalCallHandler storPoolApiCallHandlerRef,
    CtrlFullSyncResponseApiCallHandler ctrlFullSyncApiCallHandlerRef,
    Provider<Peer> satelliteProviderRef
)
{
    scopeRunner = scopeRunnerRef;
    nodesMapLock = nodesMapLockRef;
    storPoolDfnMapLock = storPoolDfnMapLockRef;
    storPoolApiCallHandler = storPoolApiCallHandlerRef;
    ctrlFullSyncApiCallHandler = ctrlFullSyncApiCallHandlerRef;
    satelliteProvider = satelliteProviderRef;
}
 
Example 3
@Inject
public CtrlVlmListApiCallHandler(
    ErrorReporter errorReporterRef,
    ScopeRunner scopeRunnerRef,
    VlmAllocatedFetcher vlmAllocatedFetcherRef,
    ResourceDefinitionRepository resourceDefinitionRepositoryRef,
    NodeRepository nodeRepositoryRef,
    LockGuardFactory lockGuardFactoryRef,
    @PeerContext Provider<AccessContext> peerAccCtxRef
)
{
    errorReporter = errorReporterRef;
    scopeRunner = scopeRunnerRef;
    vlmAllocatedFetcher = vlmAllocatedFetcherRef;
    resourceDefinitionRepository = resourceDefinitionRepositoryRef;
    nodeRepository = nodeRepositoryRef;
    lockGuardFactory = lockGuardFactoryRef;
    peerAccCtx = peerAccCtxRef;
}
 
Example 4
Source Project: Graywater   Source File: PrimitiveAdapter.java    License: Apache License 2.0 6 votes vote down vote up
@Inject
public PrimitiveAdapter(final Map<Class<? extends PrimitiveViewHolder>, ViewHolderCreator> viewHolderCreatorMapClass,
                        @NonNull final Map<Class<? extends Primitive>,
		                        Provider<ItemBinder<
				                        ? extends Primitive,
				                        ? extends PrimitiveViewHolder,
				                        ? extends Binder<? extends Primitive, PrimitiveViewHolder, ? extends PrimitiveViewHolder>>>>
		                        itemBinderMap,
                        @NonNull final Map<Class<? extends Primitive>,
		                        Provider<GraywaterAdapter.ActionListener<
				                        ? extends Primitive,
				                        PrimitiveViewHolder,
				                        ? extends PrimitiveViewHolder>>> actionListenerMap) {

	for (Map.Entry<Class<? extends PrimitiveViewHolder>, ViewHolderCreator> entry : viewHolderCreatorMapClass.entrySet()) {
		register(entry.getValue(), entry.getKey());
	}

	mItemBinderMap = itemBinderMap;
	mActionListenerMap = actionListenerMap;
}
 
Example 5
Source Project: smallrye-jwt   Source File: ProviderExtensionSupport.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Collect the types of all {@linkplain Provider} injection points annotated with {@linkplain Claim}.
 *
 * @param pip - the injection point event information
 */
void processClaimProviderInjections(@Observes ProcessInjectionPoint<?, ? extends Provider> pip) {
    CDILogging.log.pip(pip.getInjectionPoint());
    final InjectionPoint ip = pip.getInjectionPoint();
    if (ip.getAnnotated().isAnnotationPresent(Claim.class)) {
        Claim claim = ip.getAnnotated().getAnnotation(Claim.class);
        if (claim.value().length() == 0 && claim.standard() == Claims.UNKNOWN) {
            pip.addDefinitionError(CDIMessages.msg.claimHasNoNameOrValidStandardEnumSetting(ip));
        }
        boolean usesEnum = claim.standard() != Claims.UNKNOWN;
        final String claimName = usesEnum ? claim.standard().name() : claim.value();
        CDILogging.log.checkingProviderClaim(claimName, ip);
        Type matchType = ip.getType();
        // The T from the Provider<T> injection site
        Type actualType = ((ParameterizedType) matchType).getActualTypeArguments()[0];
        // Don't add Optional or JsonValue as this is handled specially
        if (isOptional(actualType)) {
            // Validate that this is not an Optional<JsonValue>
            Type innerType = ((ParameterizedType) actualType).getActualTypeArguments()[0];
            if (!isJson(innerType)) {
                providerOptionalTypes.add(actualType);
                providerQualifiers.add(claim);
            }
        }
    }
}
 
Example 6
Source Project: Graywater   Source File: GraywaterAdapter.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * @param itemPosition
 * 		the item position.
 * @return the range of viewholders that represent the item. The first is the offset, the second is the count.
 */
@Nullable
public Pair<Integer, Integer> getViewHolderRange(final int itemPosition) {
	final Pair<Integer, Integer> range;

	if (isItemPositionWithinBounds(itemPosition)) {
		final int numViewHolders = getViewHolderCount(itemPosition);

		final List<Provider<Binder<? super T, VH, ? extends VH>>> binders = mBinderListCache.get(itemPosition);

		range = new Pair<>(numViewHolders, binders.size());
	} else {
		range = null;
	}

	return range;
}
 
Example 7
Source Project: dremio-oss   Source File: UserRPCServer.java    License: Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
UserRPCServer(
    RpcConfig rpcConfig,
    Provider<UserService> userServiceProvider,
    Provider<NodeEndpoint> nodeEndpointProvider,
    WorkIngestor workIngestor,
    Provider<UserWorker> worker,
    BufferAllocator allocator,
    EventLoopGroup eventLoopGroup,
    InboundImpersonationManager impersonationManager,
    Tracer tracer,
    OptionValidatorListing optionValidatorListing
    ) {
  super(rpcConfig, allocator.getAsByteBufAllocator(), eventLoopGroup);
  this.userServiceProvider = userServiceProvider;
  this.nodeEndpointProvider = nodeEndpointProvider;
  this.workIngestor = workIngestor;
  this.worker = worker;
  this.allocator = allocator;
  this.impersonationManager = impersonationManager;
  this.sessionOptionManagerFactory = new SessionOptionManagerFactoryImpl(optionValidatorListing);
  this.tracer = tracer;
}
 
Example 8
Source Project: dremio-oss   Source File: SampleDataPopulatorService.java    License: Apache License 2.0 6 votes vote down vote up
public SampleDataPopulatorService(
  Provider<SabotContext> contextProvider,
  Provider<LegacyKVStoreProvider> kvStore,
  Provider<UserService> userService,
  Provider<InitializerRegistry> init,
  Provider<JobsService> jobsService,
  Provider<CatalogService> catalogService,
  Provider<ReflectionServiceHelper> reflectionHelper,
  Provider<ConnectionReader> connectionReader,
  Provider<CollaborationHelper> collaborationService,
  Provider<OptionManager> optionManager,
  boolean prepopulate,
  boolean addDefaultUser) {
  this.contextProvider = contextProvider;
  this.kvStore = kvStore;
  this.userService = userService;
  this.init = init;
  this.jobsService = jobsService;
  this.catalogService = catalogService;
  this.reflectionHelper = reflectionHelper;
  this.connectionReader = connectionReader;
  this.collaborationService = collaborationService;
  this.optionManager = optionManager;
  this.prepopulate = prepopulate;
  this.addDefaultUser = addDefaultUser;
}
 
Example 9
@Inject
public ResourceControllerFactory(
    ResourceDatabaseDriver dbDriverRef,
    ObjectProtectionFactory objectProtectionFactoryRef,
    PropsContainerFactory propsContainerFactoryRef,
    TransactionObjectFactory transObjFactoryRef,
    Provider<TransactionMgr> transMgrProviderRef,
    CtrlRscLayerDataFactory layerStackHelperRef
)
{
    dbDriver = dbDriverRef;
    objectProtectionFactory = objectProtectionFactoryRef;
    propsContainerFactory = propsContainerFactoryRef;
    transObjFactory = transObjFactoryRef;
    transMgrProvider = transMgrProviderRef;
    layerStackHelper = layerStackHelperRef;
}
 
Example 10
@Inject
public CmdSetConfValue(
    DbConnectionPool dbConnectionPoolRef,
    @Named(CoreModule.CTRL_CONF_LOCK) ReadWriteLock confLockRef,
    SystemConfRepository systemConfRepositoryRef,
    Provider<TransactionMgr> trnActProviderRef
)
{
    super(
        new String[]
        {
            "SetCfgVal"
        },
        "Set configuration value",
        "Sets the value of a configuration entry.\nIf the entry does not exist, it is created.",
        PARAMETER_DESCRIPTIONS,
        null
    );

    dbConnectionPool = dbConnectionPoolRef;
    confWrLock = confLockRef.writeLock();
    systemConfRepository = systemConfRepositoryRef;
    trnActProvider = trnActProviderRef;
}
 
Example 11
Source Project: dremio-oss   Source File: TestZKClusterClient.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testDefaultConnection() throws Exception {
  // Default root from sabot-module.conf
  assertNull(zooKeeperServer.getZKClient().exists("/dremio/test-path", false));

  final SabotConfig config = DEFAULT_SABOT_CONFIG
      .withValue(ZK_ROOT, ConfigValueFactory.fromAnyRef("dremio/test-path"))
      .withValue(CLUSTER_ID, ConfigValueFactory.fromAnyRef("test-cluster-id"));

  try(ZKClusterClient client = new ZKClusterClient(config, new Provider<Integer>() {
    @Override
    public Integer get() {
      return zooKeeperServer.getPort();
    }
  })) {
    client.start();
    ZKServiceSet serviceSet = client.newServiceSet("coordinator");
    serviceSet.register(NodeEndpoint.newBuilder().setAddress("foo").build());


    Stat stat = zooKeeperServer.getZKClient().exists("/dremio/test-path/test-cluster-id/coordinator", false);
    assertNotNull(stat);
    assertEquals(1, stat.getNumChildren());
  }
}
 
Example 12
@Inject
public ResourceGroupControllerFactory(
    ResourceGroupDatabaseDriver driverRef,
    ObjectProtectionFactory objectProtectionFactoryRef,
    PropsContainerFactory propsContainerFactoryRef,
    TransactionObjectFactory transObjFactoryRef,
    Provider<TransactionMgr> transMgrProviderRef,
    ResourceGroupRepository resourceGroupRepositoryRef
)
{
    driver = driverRef;
    objectProtectionFactory = objectProtectionFactoryRef;
    propsContainerFactory = propsContainerFactoryRef;
    transObjFactory = transObjFactoryRef;
    transMgrProvider = transMgrProviderRef;
    rscGrpRepository = resourceGroupRepositoryRef;
}
 
Example 13
@Inject
public OpenflexLayerETCDDriver(
    @SystemContext AccessContext dbCtxRef,
    ErrorReporter errorReporterRef,
    ResourceLayerIdDatabaseDriver idDriverRef,
    TransactionObjectFactory transObjFactoryRef,
    Provider<TransactionMgrETCD> transMgrProviderRef
)
{
    super(transMgrProviderRef);
    dbCtx = dbCtxRef;
    errorReporter = errorReporterRef;
    idDriver = idDriverRef;
    transObjFactory = transObjFactoryRef;

    nqnDriver = new NqnDriver();
}
 
Example 14
@Inject
public ObjectProtectionSQLDbDriver(
    @SystemContext AccessContext accCtx,
    ErrorReporter errorReporterRef,
    TransactionObjectFactory transObjFactoryRef,
    Provider<TransactionMgrSQL> transMgrProviderRef
)
{
    dbCtx = accCtx;
    transMgrProvider = transMgrProviderRef;
    identityDriver = new IdentityGenericDbDriver();
    roleDriver = new RoleGenericDbDriver();
    securityTypeDriver = new SecurityTypeGenericDbDriver();
    errorReporter = errorReporterRef;
    transObjFactory = transObjFactoryRef;
}
 
Example 15
@Inject
public NodeSatelliteFactory(
    NodeDatabaseDriver dbDriverRef,
    ObjectProtectionFactory objectProtectionFactoryRef,
    StorPoolSatelliteFactory storPoolFactoryRef,
    PropsContainerFactory propsContainerFactoryRef,
    TransactionObjectFactory transObjFactoryRef,
    FreeSpaceMgrSatelliteFactory freeSpaceMgrFactoryRef,
    Provider<TransactionMgr> transMgrProviderRef,
    CoreModule.NodesMap nodesMapRef
)
{
    dbDriver = dbDriverRef;
    objectProtectionFactory = objectProtectionFactoryRef;
    storPoolFactory = storPoolFactoryRef;
    propsContainerFactory = propsContainerFactoryRef;
    transObjFactory = transObjFactoryRef;
    freeSpaceMgrFactory = freeSpaceMgrFactoryRef;
    transMgrProvider = transMgrProviderRef;
    nodesMap = nodesMapRef;
}
 
Example 16
Source Project: dremio-oss   Source File: TestAutoRefreshConfiguration.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testInitialStateNoChanges()  throws InterruptedException{
  final Integer staleInt = 42;
  final CompleteRefreshConfig<Integer> wholeConf = new CompleteRefreshConfig<>(defaultRefreshEnabled, staleInt);

  Provider<CompleteRefreshConfig<Integer>> unchangingGetter =  () -> wholeConf;

  AutoRefreshConfigurator<Integer> refresher = new AutoRefreshConfigurator<>(unchangingGetter, listener, 0);

  defaultSleep();

  assertEquals(1, listener.getLog().size());
  assertEquals(42, listener.getLog().get(0).intValue());
}
 
Example 17
Source Project: dremio-oss   Source File: NoopKVStoreProvider.java    License: Apache License 2.0 5 votes vote down vote up
public NoopKVStoreProvider(
  ScanResult scan,
  Provider<FabricService> fabricService,
  Provider<NodeEndpoint> masterNode,
  BufferAllocator allocator,
  Map<String, Object> config
) {
  this.scan = scan;
}
 
Example 18
Source Project: curiostack   Source File: GrpcGraphUtil.java    License: MIT License 5 votes vote down vote up
/**
 * Wires the result of a {@link ListenableFuture} to the response handling methods of a {@link
 * StreamObserver} for a {@link
 * org.curioswitch.common.server.framework.grpc.GrpcProductionComponent} which takes no arguments.
 *
 * @deprecated Use {@link #unary(ListenableFuture, StreamObserver)}. The boilerplate removal of
 *     {@code .get().execute()} is not worth having to implement interfaces.
 */
@Deprecated
public static <Resp extends Message, C extends GrpcProductionComponent<Resp>> void unary(
    StreamObserver<Resp> observer, Provider<C> component) {
  Futures.addCallback(
      component.get().execute(),
      new UnaryStreamObserverCallback<>(observer),
      MoreExecutors.directExecutor());
}
 
Example 19
public StateFlagsBits(
    final List<ObjectProtection> objProtRef,
    final PRIMARY_KEY parent,
    final long validFlagsMask,
    final StateFlagsPersistence<PRIMARY_KEY> persistenceRef,
    final Provider<TransactionMgr> transMgrProviderRef
)
{
    this(objProtRef, parent, validFlagsMask, persistenceRef, 0L, transMgrProviderRef);
}
 
Example 20
@Inject
public ObjectProtectionFactory(
    ObjectProtectionDatabaseDriver dbDriverRef,
    Provider<TransactionMgr> transMgrProviderRef,
    TransactionObjectFactory transObjFactoryRef
)
{
    dbDriver = dbDriverRef;
    transMgrProvider = transMgrProviderRef;
    transObjFactory = transObjFactoryRef;
}
 
Example 21
Source Project: festival   Source File: DefaultSingletonBeanRegistry.java    License: Apache License 2.0 5 votes vote down vote up
protected void registerSingleton(String beanName, Provider<?> provider) {
    synchronized (singletons) {
        if (singletonProviders.containsKey(beanName)) {
            throw new IllegalArgumentException(String.format("provider singleton %s is already exist !", beanName));
        }
        registerSingletons.add(beanName);
        singletonProviders.put(beanName, provider);
        earlySingletons.remove(beanName);
    }
}
 
Example 22
Source Project: Graywater   Source File: GraywaterAdapterTest.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void bind(@NonNull final Uri model,
                 @NonNull final ImageViewHolder holder,
                 @NonNull final List<Provider<Binder<
		                 ? super Uri, RecyclerView.ViewHolder, ? extends RecyclerView.ViewHolder>>> binderList,
                 final int binderIndex,
                 @Nullable final ActionListener<Uri, RecyclerView.ViewHolder, ImageViewHolder> actionListener) {
	((ImageView) holder.itemView).setImageURI(model); // not a good idea in production ;)
}
 
Example 23
Source Project: smallrye-config   Source File: ProviderAloneTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testProvider() {
    Provider<Email> emailProvider = bean.emailProvider;
    assertNotNull(emailProvider);
    Email email = emailProvider.get();
    assertNotNull(email);
    assertEquals("example", email.getName());
    assertEquals("smallrye.io", email.getDomain());
}
 
Example 24
@Inject
public PublishPayloadLocalPersistenceProvider(final @NotNull Provider<PublishPayloadRocksDBLocalPersistence> rocksDBProvider,
                                               final @NotNull Provider<PublishPayloadXodusLocalPersistence> xodusProvider) {
    this.rocksDBProvider = rocksDBProvider;
    this.xodusProvider = xodusProvider;
    this.persistenceType = InternalConfigurations.PAYLOAD_PERSISTENCE_TYPE.get();
}
 
Example 25
Source Project: nexus-repository-p2   Source File: P2Upgrade_1_1.java    License: Eclipse Public License 1.0 5 votes vote down vote up
@Inject
public P2Upgrade_1_1(
    @Named(DatabaseInstanceNames.CONFIG) final Provider<DatabaseInstance> configDatabaseInstance,
    @Named(DatabaseInstanceNames.COMPONENT) final Provider<DatabaseInstance> componentDatabaseInstance)
{
  this.configDatabaseInstance = checkNotNull(configDatabaseInstance);
  this.componentDatabaseInstance = checkNotNull(componentDatabaseInstance);
}
 
Example 26
@Inject
public CtrlSnapshotCrtApiCallHandler(
    @ApiContext AccessContext apiCtxRef,
    ScopeRunner scopeRunnerRef,
    CtrlTransactionHelper ctrlTransactionHelperRef,
    CtrlSnapshotHelper ctrlSnapshotHelperRef,
    CtrlApiDataLoader ctrlApiDataLoaderRef,
    SnapshotDefinitionControllerFactory snapshotDefinitionFactoryRef,
    SnapshotVolumeDefinitionControllerFactory snapshotVolumeDefinitionControllerFactoryRef,
    SnapshotControllerFactory snapshotFactoryRef,
    SnapshotVolumeControllerFactory snapshotVolumeControllerFactoryRef,
    CtrlSatelliteUpdateCaller ctrlSatelliteUpdateCallerRef,
    ResponseConverter responseConverterRef,
    LockGuardFactory lockGuardFactoryRef,
    @PeerContext Provider<AccessContext> peerAccCtxRef,
    CtrlRscLayerDataFactory layerStackHelperRef,
    CtrlPropsHelper ctrlPropsHelperRef
)
{
    apiCtx = apiCtxRef;
    scopeRunner = scopeRunnerRef;
    ctrlTransactionHelper = ctrlTransactionHelperRef;
    ctrlSnapshotHelper = ctrlSnapshotHelperRef;
    ctrlApiDataLoader = ctrlApiDataLoaderRef;
    snapshotDefinitionFactory = snapshotDefinitionFactoryRef;
    snapshotVolumeDefinitionControllerFactory = snapshotVolumeDefinitionControllerFactoryRef;
    snapshotFactory = snapshotFactoryRef;
    snapshotVolumeControllerFactory = snapshotVolumeControllerFactoryRef;
    ctrlSatelliteUpdateCaller = ctrlSatelliteUpdateCallerRef;
    responseConverter = responseConverterRef;
    lockGuardFactory = lockGuardFactoryRef;
    peerAccCtx = peerAccCtxRef;
    layerStackHelper = layerStackHelperRef;
    ctrlPropsHelper = ctrlPropsHelperRef;
}
 
Example 27
Source Project: linstor-server   Source File: TestFactory.java    License: GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a new {@link ResourceDefinition} without persisting it to the database
 * @throws DatabaseException
 */
public static ResourceDefinition createResourceDefinition(
    UUID resDfnUuidRef,
    ObjectProtection resDfnObjProtRef,
    ResourceName resNameRef,
    byte[] extName,
    long flagValueRef,
    List<DeviceLayerKind> layerStackRef,
    ResourceDefinitionDbDriver driverRef,
    PropsContainerFactory propsContainerFactoryRef,
    TransactionObjectFactory transObjFactoryRef,
    Provider<? extends TransactionMgr> transMgrProviderRef,
    Map<VolumeNumber, VolumeDefinition> vlmDfnMapRef,
    Map<NodeName, Resource> rscMapRef,
    Map<SnapshotName, SnapshotDefinition> snapshotDfnMapRef,
    Map<Pair<DeviceLayerKind, String>, RscDfnLayerObject> layerDataMapRef,
    ResourceGroup rscGrpRef
)
    throws DatabaseException
{
    return new ResourceDefinition(
        resDfnUuidRef,
        resDfnObjProtRef,
        resNameRef,
        extName,
        flagValueRef,
        layerStackRef,
        driverRef,
        propsContainerFactoryRef,
        transObjFactoryRef,
        transMgrProviderRef,
        vlmDfnMapRef,
        rscMapRef,
        snapshotDfnMapRef,
        layerDataMapRef,
        rscGrpRef
    );
}
 
Example 28
@Inject
public RscDfnInternalCallHandler(
    ErrorReporter errorReporterRef,
    @ApiContext AccessContext apiCtxRef,
    CtrlTransactionHelper ctrlTransactionHelperRef,
    CtrlPropsHelper ctrlPropsHelperRef,
    CtrlApiDataLoader ctrlApiDataLoaderRef,
    ResourceDefinitionControllerFactory resourceDefinitionFactoryRef,
    ResourceDefinitionRepository resourceDefinitionRepositoryRef,
    CtrlStltSerializer ctrlStltSerializerRef,
    CtrlSatelliteUpdater ctrlSatelliteUpdaterRef,
    ResponseConverter responseConverterRef,
    Provider<Peer> peerRef,
    @PeerContext Provider<AccessContext> peerAccCtxRef,
    @Named(CoreModule.RSC_DFN_MAP_LOCK) ReadWriteLock rscDfnMapLockRef
)
{
    errorReporter = errorReporterRef;
    apiCtx = apiCtxRef;
    ctrlTransactionHelper = ctrlTransactionHelperRef;
    ctrlPropsHelper = ctrlPropsHelperRef;
    ctrlApiDataLoader = ctrlApiDataLoaderRef;
    resourceDefinitionFactory = resourceDefinitionFactoryRef;
    resourceDefinitionRepository = resourceDefinitionRepositoryRef;
    ctrlStltSerializer = ctrlStltSerializerRef;
    ctrlSatelliteUpdater = ctrlSatelliteUpdaterRef;
    responseConverter = responseConverterRef;
    peer = peerRef;
    peerAccCtx = peerAccCtxRef;
    rscDfnMapLock = rscDfnMapLockRef;
}
 
Example 29
Source Project: dremio-oss   Source File: SearchServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
public SearchServiceImpl(
  Provider<NamespaceService> namespaceServiceProvider,
  Provider<OptionManager> optionManagerProvider,
  Provider<LegacyKVStoreProvider> storeProvider,
  Provider<SchedulerService> schedulerService,
  ExecutorService executorService
) {
  this.namespaceServiceProvider = namespaceServiceProvider;
  this.optionManagerProvider = optionManagerProvider;
  this.storeProvider = storeProvider;
  this.schedulerService = schedulerService;
  this.executorService = executorService;
}
 
Example 30
Source Project: linstor-server   Source File: TestFactory.java    License: GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a new {@link StorPool} without persisting it to the database
 * @throws DatabaseException
 */
public static StorPool createStorPool(
    UUID uuidRef,
    Node nodeRef,
    StorPoolDefinition spddRef,
    DeviceProviderKind lvmRef,
    FreeSpaceMgr fsmRef,
    StorPoolDbDriver driverRef,
    PropsContainerFactory propsContainerFactoryRef,
    TransactionObjectFactory transObjFactoryRef,
    Provider<? extends TransactionMgr> transMgrProviderRef,
    Map<String, VlmProviderObject<Resource>> volumeMapRef,
    Map<String, VlmProviderObject<Snapshot>> snapshotVolumeMapRef
)
    throws DatabaseException
{
    return new StorPool(
        uuidRef,
        nodeRef,
        spddRef,
        lvmRef,
        fsmRef,
        driverRef,
        propsContainerFactoryRef,
        transObjFactoryRef,
        transMgrProviderRef,
        volumeMapRef,
        snapshotVolumeMapRef
    );
}