Determines if the given datastore is externalizable by this object.

@param datastore
@return
765992
public boolean isExternalizable(final Datastore datastore) {
        if (datastore == null) {
            return false;
        }

        if (datastore instanceof JdbcDatastore) {
            return true;
        }

        if (datastore instanceof CsvDatastore) {
            final Resource resource = ((CsvDatastore) datastore).getResource();
            return isExternalizable(resource);
        }

        if (datastore instanceof ExcelDatastore) {
            final Resource resource = ((ExcelDatastore) datastore).getResource();
            return isExternalizable(resource);
        }

        if (datastore instanceof ArffDatastore) {
            final Resource resource = ((ArffDatastore) datastore).getResource();
            return isExternalizable(resource);
        }

        if (datastore instanceof ElasticSearchDatastore) {
            final SimpleTableDef[] tableDefs = ((ElasticSearchDatastore) datastore).getTableDefs();
            if (tableDefs == null) {
                return true;
            }
        }

        if (datastore instanceof MongoDbDatastore) {
            final SimpleTableDef[] tableDefs = ((MongoDbDatastore) datastore).getTableDefs();
            if (tableDefs == null) {
                return true;
            }
        }

        if (datastore instanceof CouchDbDatastore) {
            final SimpleTableDef[] tableDefs = ((CouchDbDatastore) datastore).getTableDefs();
            if (tableDefs == null) {
                return true;
            }
        }

        if (datastore instanceof SalesforceDatastore) {
            return true;
        }
        if (datastore instanceof DynamoDbDatastore) {
            final SimpleTableDef[] tableDefs = ((DynamoDbDatastore) datastore).getTableDefs();
            if (tableDefs == null) {
                return true;
            }
        }
        if (datastore instanceof JsonDatastore) {
            final Resource resource = ((JsonDatastore) datastore).getResource();
            return isExternalizable(resource);
        }
        if (datastore instanceof FixedWidthDatastore) {
            return true;
        }
        if (datastore instanceof KafkaDatastore) {
            return true;
        }
        return false;
    }
102069
def _datastore_api(self):
        """"""
        if self._datastore_api_internal is None:
            if self._use_grpc:
                self._datastore_api_internal = make_datastore_api(self)
            else:
                self._datastore_api_internal = HTTPDatastoreAPI(self)
        return self._datastore_api_internal
296875
def is_external(self):
        """"""
        # NOTE: Checking for equality HintSystem==False returns False if the
        # property is resolved to a None value (interface not available).
        if self._P.Block.HintSystem == False:       # noqa: E712
            return True
        # NOTE: udisks2 seems to guess incorrectly in some cases. This
        # leads to HintSystem=True for unlocked devices. In order to show
        # the device anyway, it needs to be recursively checked if any
        # parent device is recognized as external.
        if self.is_luks_cleartext and self.luks_cleartext_slave.is_external:
            return True
        if self.is_partition and self.partition_slave.is_external:
            return True
        return False
234963
public DataStore getDataStore(final Collection<String> columns) {
        for (DataStore ds : dataBatches) {
            if (ds.hasColumns(columns)) {
                return ds;
            }
        }
        return null;
    }
1124339
protected boolean getReadOnly(final String dataSourceName) {
		Map<String, String> props = getConnPropsByDataSourceName(dataSourceName);
		return Boolean.parseBoolean(props.get(PROPS_READ_ONLY));
	}
1045475
private Object putToRecordStore(Data dataKey, Data dataValue) {
        if (hasMapListener) {
            return recordStore.put(dataKey, dataValue, DEFAULT_TTL, DEFAULT_MAX_IDLE);
        }
        recordStore.set(dataKey, dataValue, DEFAULT_TTL, DEFAULT_MAX_IDLE);
        return null;
    }
1046568
@Override
    public <T> T readInstance(DatastoreType datastoreType) {
        return getInstance(datastoreType, TransactionalCache.Mode.READ);
    }
471063
private boolean isSharingEnabledForNode(BuildContext context, BaseNode node) {
        if ( NodeTypeEnums.isLeftTupleSource( node )) {
            return context.getKnowledgeBase().getConfiguration().isShareBetaNodes();
        } else if ( NodeTypeEnums.isObjectSource( node ) ) {
            return context.getKnowledgeBase().getConfiguration().isShareAlphaNodes();
        }
        return false;
    }
914671
public VmfsDatastoreOption[] queryVmfsDatastoreExtendOptions(Datastore datastore, String devicePath, Boolean suppressExpandCandidates) throws HostConfigFault, NotFound, RuntimeFault, RemoteException {
        if (datastore == null) {
            throw new IllegalArgumentException("datastore must not be null.");
        }
        return getVimService().queryVmfsDatastoreExtendOptions(getMOR(), datastore.getMOR(), devicePath, suppressExpandCandidates);
    }
204615
public Element toElement(final MongoDbDatastore datastore) {
        final Element ds = getDocument().createElement("mongodb-datastore");
        ds.setAttribute("name", datastore.getName());
        if (!Strings.isNullOrEmpty(datastore.getDescription())) {
            ds.setAttribute("description", datastore.getDescription());
        }

        appendElement(ds, "hostname", datastore.getHostname());
        appendElement(ds, "port", datastore.getPort());
        appendElement(ds, "database-name", datastore.getDatabaseName());
        appendElement(ds, "username", datastore.getUsername());
        appendElement(ds, "password", encodePassword(datastore.getPassword()));

        return ds;
    }
270648
public Element toElement(final DynamoDbDatastore datastore) {
        final Element ds = getDocument().createElement("dynamodb-datastore");
        ds.setAttribute("name", datastore.getName());
        if (!Strings.isNullOrEmpty(datastore.getDescription())) {
            ds.setAttribute("description", datastore.getDescription());
        }

        appendElement(ds, "region", datastore.getRegion());
        appendElement(ds, "accessKeyId", datastore.getAccessKeyId());
        appendElement(ds, "secretAccessKey", encodePassword(datastore.getSecretAccessKey()));
        return ds;
    }
305303
protected boolean isHSQLDatabase() throws HandlerException {
        String dbName = determineDatabaseType();
        if (dbName == null) {
            return false;
        }
        return "HSQL Database Engine".equalsIgnoreCase(dbName);
    }
284784
public List<DatastoreDescriptor> getAvailableDatabaseBasedDatastoreDescriptors() {
        final List<DatastoreDescriptor> availableCloudBasedDatabaseDescriptors = new ArrayList<>();

        availableCloudBasedDatabaseDescriptors.add(POSTGRESQL_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(SQLSERVER_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(ELASTICSEARCH_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(HBASE_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(HIVE_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(CASSANDRA_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(MONGODB_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(COUCHDB_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(DYNAMODB_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(KAFKA_DATASTORE_DESCRIPTOR);
        availableCloudBasedDatabaseDescriptors.add(NEO4J_DATASTORE_DESCRIPTOR);

        return availableCloudBasedDatabaseDescriptors;
    }
1120205
private boolean isNamespaceAvailable(String databaseName)
    {
        try
        {
            for (NamespaceDescriptor ns : admin.listNamespaceDescriptors())
            {
                if (ns.getName().equals(databaseName))
                {
                    return true;
                }
            }
            return false;
        }
        catch (IOException ioex)
        {
            logger.error("Either table isn't in enabled state or some network problem, Caused by: ", ioex);
            throw new SchemaGenerationException(ioex, "Either table isn't in enabled state or some network problem.");
        }
    }
577790
private boolean isApplicable(QueryCacheEventData event) {
        if (!getInfo().isPublishable()) {
            return false;
        }

        final int partitionId = event.getPartitionId();

        if (isEndEvent(event)) {
            sequenceProvider.reset(partitionId);
            removeFromBrokenSequences(event);
            return false;
        }

        if (isNextEvent(event)) {
            long currentSequence = sequenceProvider.getSequence(partitionId);
            sequenceProvider.compareAndSetSequence(currentSequence, event.getSequence(), partitionId);

            removeFromBrokenSequences(event);
            return true;
        }

        handleUnexpectedEvent(event);

        return false;
    }
736371
protected boolean isSwappableData(Object obj) {
        if (obj != null && (obj instanceof Serializable || obj instanceof Externalizable)) {
            return true;
        }
        return false;
    }
926967
public DataStore getOrAddDataStore(final Collection<String> columns) {
        DataStore ret = getDataStore(columns);
        if (ret == null) {
            ret = this.createDataStore(columns);
        }
        return ret;
    }