public class ZooKeeperModuleMetadataRepository extends java.lang.Object implements ModuleMetadataRepository
| Constructor and Description |
|---|
ZooKeeperModuleMetadataRepository(ZooKeeperConnection zkConnection,
StreamRepository streamRepository,
JobRepository jobRepository) |
| Modifier and Type | Method and Description |
|---|---|
long |
count() |
void |
delete(java.lang.Iterable<? extends ModuleMetadata> entities) |
void |
delete(ModuleMetadata.Id id) |
void |
delete(ModuleMetadata entity) |
void |
deleteAll() |
boolean |
exists(ModuleMetadata.Id id) |
java.util.List<ModuleMetadata> |
findAll() |
java.lang.Iterable<ModuleMetadata> |
findAll(java.lang.Iterable<ModuleMetadata.Id> ids) |
org.springframework.data.domain.Page<ModuleMetadata> |
findAll(org.springframework.data.domain.Pageable pageable) |
java.lang.Iterable<ModuleMetadata> |
findAll(org.springframework.data.domain.Sort sort) |
org.springframework.data.domain.Page<ModuleMetadata> |
findAllByContainerId(org.springframework.data.domain.Pageable pageable,
java.lang.String containerId)
Find paged
ModuleMetadata for all the modules deployed
into the given container. |
java.util.List<ModuleMetadata> |
findAllByContainerId(java.lang.String containerId)
Find all the modules that are deployed into this container.
|
org.springframework.data.domain.Page<ModuleMetadata> |
findAllByModuleId(org.springframework.data.domain.Pageable pageable,
java.lang.String moduleId)
Find paged
ModuleMetadata for the modules of given moduleId. |
java.lang.Iterable<ModuleMetadata> |
findAllInRange(ModuleMetadata.Id from,
boolean fromInclusive,
ModuleMetadata.Id to,
boolean toInclusive)
Return entities whose ids range between
from and to. |
ModuleMetadata |
findOne(ModuleMetadata.Id id) |
ModuleMetadata |
findOne(java.lang.String containerId,
java.lang.String moduleId)
Find
ModuleMetadata for the module that has the given module id and
deployed into given container. |
<S extends ModuleMetadata> |
save(java.lang.Iterable<S> entities) |
<S extends ModuleMetadata> |
save(S entity) |
@Autowired public ZooKeeperModuleMetadataRepository(ZooKeeperConnection zkConnection, StreamRepository streamRepository, JobRepository jobRepository)
public java.lang.Iterable<ModuleMetadata> findAll(org.springframework.data.domain.Sort sort)
findAll in interface org.springframework.data.repository.PagingAndSortingRepository<ModuleMetadata,ModuleMetadata.Id>public org.springframework.data.domain.Page<ModuleMetadata> findAll(org.springframework.data.domain.Pageable pageable)
findAll in interface org.springframework.data.repository.PagingAndSortingRepository<ModuleMetadata,ModuleMetadata.Id>public ModuleMetadata findOne(java.lang.String containerId, java.lang.String moduleId)
ModuleMetadata for the module that has the given module id and
deployed into given container.findOne in interface ModuleMetadataRepositorycontainerId - the container IdmoduleId - the moduleIdModuleMetadatapublic org.springframework.data.domain.Page<ModuleMetadata> findAllByContainerId(org.springframework.data.domain.Pageable pageable, java.lang.String containerId)
ModuleMetadata for all the modules deployed
into the given container.findAllByContainerId in interface ModuleMetadataRepositorypageable - the pageable metadatacontainerId - the container IdModuleMetadatapublic org.springframework.data.domain.Page<ModuleMetadata> findAllByModuleId(org.springframework.data.domain.Pageable pageable, java.lang.String moduleId)
ModuleMetadata for the modules of given moduleId.findAllByModuleId in interface ModuleMetadataRepositorypageable - the pageable metadatamoduleId - the module IdModuleMetadatapublic ModuleMetadata findOne(ModuleMetadata.Id id)
Find the module metadata for the modules that are deployed into the given container and module metadata id.
findOne in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>id - unique id for module deploymentModuleMetadata of the module.public boolean exists(ModuleMetadata.Id id)
exists in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>public java.util.List<ModuleMetadata> findAll()
findAll in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>public java.util.List<ModuleMetadata> findAllByContainerId(java.lang.String containerId)
findAllByContainerId in interface ModuleMetadataRepositorycontainerId - the containerIdModuleMetadata of the modules deployed into this container.public java.lang.Iterable<ModuleMetadata> findAll(java.lang.Iterable<ModuleMetadata.Id> ids)
findAll in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>public java.lang.Iterable<ModuleMetadata> findAllInRange(ModuleMetadata.Id from, boolean fromInclusive, ModuleMetadata.Id to, boolean toInclusive)
RangeCapableRepositoryfrom and to. Note that it is possible that entities with
those exact ids do not exist. If they do exist, the two boolean parameters control whether to include those
results or not. A query from x to x returns an empty result, unless both fromInclusive
and toInclusive are true.findAllInRange in interface RangeCapableRepository<ModuleMetadata,ModuleMetadata.Id>public long count()
count in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>public <S extends ModuleMetadata> S save(S entity)
save in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>public <S extends ModuleMetadata> java.lang.Iterable<S> save(java.lang.Iterable<S> entities)
save in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>public void delete(ModuleMetadata.Id id)
delete in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>public void delete(ModuleMetadata entity)
delete in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>public void delete(java.lang.Iterable<? extends ModuleMetadata> entities)
delete in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>public void deleteAll()
deleteAll in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,ModuleMetadata.Id>