package com.parse;

import java.io.File;
import java.util.concurrent.atomic.AtomicReference;

/* JADX INFO: loaded from: classes.dex */
public class ParseCorePlugins {
    public static final ParseCorePlugins INSTANCE = new ParseCorePlugins();
    public AtomicReference<ParseCloudCodeController> cloudCodeController;
    public AtomicReference<ParseConfigController> configController;
    public AtomicReference<ParseDefaultACLController> defaultACLController;
    public AtomicReference<LocalIdManager> localIdManager;
    public AtomicReference<ParseObjectSubclassingController> subclassingController;
    public AtomicReference<ParseObjectController> objectController = new AtomicReference<>();
    public AtomicReference<ParseUserController> userController = new AtomicReference<>();
    public AtomicReference<ParseSessionController> sessionController = new AtomicReference<>();
    public AtomicReference<ParseCurrentUserController> currentUserController = new AtomicReference<>();
    public AtomicReference<ParseCurrentInstallationController> currentInstallationController = new AtomicReference<>();
    public AtomicReference<ParseAuthenticationManager> authenticationController = new AtomicReference<>();
    public AtomicReference<ParseQueryController> queryController = new AtomicReference<>();
    public AtomicReference<ParseFileController> fileController = new AtomicReference<>();

    public ParseCorePlugins() {
        new AtomicReference();
        this.cloudCodeController = new AtomicReference<>();
        this.configController = new AtomicReference<>();
        new AtomicReference();
        new AtomicReference();
        this.defaultACLController = new AtomicReference<>();
        this.localIdManager = new AtomicReference<>();
        this.subclassingController = new AtomicReference<>();
    }

    public ParseCurrentUserController getCurrentUserController() {
        if (this.currentUserController.get() == null) {
            ParseObjectStore fileObjectStore = new FileObjectStore(ParseUser.class, new File(Parse.getParseDir(), "currentUser"), ParseUserCurrentCoder.INSTANCE);
            if (Parse.isLocalDatastoreEnabled) {
                fileObjectStore = new OfflineObjectStore(ParseUser.class, "_currentUser", fileObjectStore);
            }
            this.currentUserController.compareAndSet(null, new CachedCurrentUserController(fileObjectStore));
        }
        return this.currentUserController.get();
    }

    public LocalIdManager getLocalIdManager() {
        if (this.localIdManager.get() == null) {
            this.localIdManager.compareAndSet(null, new LocalIdManager(Parse.getParseDir()));
        }
        return this.localIdManager.get();
    }

    public ParseObjectSubclassingController getSubclassingController() {
        if (this.subclassingController.get() == null) {
            this.subclassingController.compareAndSet(null, new ParseObjectSubclassingController());
        }
        return this.subclassingController.get();
    }
}
