A RepositorySource for an in-memory repository. Each InMemoryRepositorySource instance contains its own
repository, and the lifetime of the source dictates the lifetime of the repository and its content.

setJndiName(String name,
Context context)
Register this source in JNDI under the supplied name using the supplied context. to set a JNDI name, this source will be
bound to that name using the default InitialContext.

getRetryLimit

public int getRetryLimit()

Get the maximum number of retries that may be performed on a given operation when using connections created by this source. This value does not constitute a minimum number of retries; in fact, the connection
user is not required to retry any operations.

setRetryLimit

public void setRetryLimit(int limit)

Set the maximum number of retries that may be performed on a given operation when using connections created by this source. This value does not constitute a minimum number of retries; in fact, the connection
user is not required to retry any operations.

setJndiName

Register this source in JNDI under the supplied name using the supplied context. to set a JNDI name, this source will be
bound to that name using the default InitialContext. You can also do this manually if you have additional
requirements.

Parameters:

name - the JNDI name, or null if this object is to no longer be registered

context - the JNDI context, or null if the InitialContext should be used

close

public void close()

Signal this source that it is no longer needed and should begin the process of reclaiming or closing all resources that it
has acquired. Because connections may still be in use, this method may not necessarily close all
resources immediately.

This is a required method, and must be called when this source is no longer needed if one or more connections have been obtained since the previous call to this method.

Note that calling this method also does not preclude obtaining more connections after this method
is called. If that happens, this source should simply reacquire any resources necessary to provide additional connections,
and this method needs to be called once again.

setUpdatesAllowed

public void setUpdatesAllowed(boolean updatesAllowed)

In-memory connectors aren't shared and cannot be loaded from external sources if updates are not allowed. Therefore, in
order to avoid setting up an in-memory connector that is permanently empty (presumably, not a desired outcome), all
in-memory connectors must allow updates.