@Override protected void decorateIdentity(final List<Object> identifiers) { super.decorateIdentity(identifiers); identifiers.add(_filename); } }
@Override public UpdateableDatastoreConnection openConnection() { final DatastoreConnection connection = super.openConnection(); return (UpdateableDatastoreConnection) connection; }
@Override protected void decorateIdentity(final List<Object> identifiers) { identifiers.add(getName()); identifiers.add(_description); }
/** * Gets whether the datacontext provider is already open / ready or if it * has to be created. * * @return a boolean indicating if the datacontext provider is open */ public final boolean isDatastoreConnectionOpen() { if (_datastoreConnectionRef == null) { return false; } final UsageAwareDatastoreConnection<E> dataContextProvider = _datastoreConnectionRef.get(); return isDataContextProviderOpen(dataContextProvider); }
/** * {@inheritDoc} */ private synchronized UsageAwareDatastoreConnection<E> getDatastoreConnection() { if (_datastoreConnection != null) { return _datastoreConnection; } UsageAwareDatastoreConnection<E> datastoreConnection; if (_datastoreConnectionRef != null) { datastoreConnection = _datastoreConnectionRef.get(); if (datastoreConnection != null && datastoreConnection.requestUsage()) { // reuse existing data context provider logger.debug("Reusing existing DatastoreConnection: {}", datastoreConnection); return datastoreConnection; } } datastoreConnection = createDatastoreConnection(); if (datastoreConnection == null) { throw new IllegalStateException("createDatastoreConnection() returned null"); } _datastoreConnectionRef = new WeakReference<>(datastoreConnection); return datastoreConnection; }
@Override public DatastoreConnection openConnection() { final UsageAwareDatastoreConnection<E> connection = getDatastoreConnection(); if (connection instanceof UpdateableDatastoreConnection) { return new UpdateableDatastoreConnectionLease((UpdateableDatastoreConnection) connection); } else { return new DatastoreConnectionLease(connection); } }
@Override public String toString() { return getClass().getSimpleName() + "[name=" + getName() + "]"; } }
@Override protected void decorateIdentity(final List<Object> identifiers) { super.decorateIdentity(identifiers); identifiers.add(_filename); } }
@Override public UpdateableDatastoreConnection openConnection() { final DatastoreConnection connection = super.openConnection(); return (UpdateableDatastoreConnection) connection; }
@Override protected void decorateIdentity(final List<Object> identifiers) { super.decorateIdentity(identifiers); identifiers.add(_datastores); } }
@Override public UpdateableDatastoreConnection openConnection() { final DatastoreConnection connection = super.openConnection(); return (UpdateableDatastoreConnection) connection; }
@Override protected void decorateIdentity(final List<Object> identifiers) { super.decorateIdentity(identifiers); identifiers.add(_filename); } }
@Override public UpdateableDatastoreConnection openConnection() { final DatastoreConnection connection = super.openConnection(); return (UpdateableDatastoreConnection) connection; }
@Override protected void decorateIdentity(final List<Object> identifiers) { super.decorateIdentity(identifiers); identifiers.add(_filename); } }
@Override public UpdateableDatastoreConnection openConnection() { final DatastoreConnection connection = super.openConnection(); return (UpdateableDatastoreConnection) connection; }
@Override protected void decorateIdentity(final List<Object> identifiers) { super.decorateIdentity(identifiers); identifiers.add(_resourceRef); }
@Override public UpdateableDatastoreConnection openConnection() { final DatastoreConnection connection = super.openConnection(); return (UpdateableDatastoreConnection) connection; }
@Override protected void decorateIdentity(final List<Object> identifiers) { super.decorateIdentity(identifiers); identifiers.add(_filename); identifiers.add(_tableDefs); } }
@Override public UpdateableDatastoreConnection openConnection() { return (UpdateableDatastoreConnection) super.openConnection(); }
@Override protected void decorateIdentity(final List<Object> identifiers) { super.decorateIdentity(identifiers); identifiers.add(_hostname); identifiers.add(_indexName); identifiers.add(_tableDefs); } }