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 entity) |
void |
delete(java.lang.String id) |
void |
deleteAll() |
boolean |
exists(java.lang.String id) |
java.util.List<ModuleMetadata> |
findAll() |
java.lang.Iterable<ModuleMetadata> |
findAll(java.lang.Iterable<java.lang.String> 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 the module metadata for the modules that are 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 all module metadata by the given module id.
|
java.lang.Iterable<ModuleMetadata> |
findAllInRange(java.lang.String from,
boolean fromInclusive,
java.lang.String to,
boolean toInclusive)
Return entities whose ids range between
from and to . |
ModuleMetadata |
findOne(java.lang.String metadataPath) |
ModuleMetadata |
findOne(java.lang.String containerId,
java.lang.String moduleId)
Find the module metadata for the modules that are deployed into the
given container and module id.
|
<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,java.lang.String>
public org.springframework.data.domain.Page<ModuleMetadata> findAll(org.springframework.data.domain.Pageable pageable)
findAll
in interface org.springframework.data.repository.PagingAndSortingRepository<ModuleMetadata,java.lang.String>
public <S extends ModuleMetadata> java.lang.Iterable<S> save(java.lang.Iterable<S> entities)
save
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public ModuleMetadata findOne(java.lang.String containerId, java.lang.String moduleId)
findOne
in interface ModuleMetadataRepository
containerId
- the containerId of the containermoduleId
- the module id to use.ModuleMetadata
of the module.public ModuleMetadata findOne(java.lang.String metadataPath)
findOne
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public boolean exists(java.lang.String id)
exists
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public java.util.List<ModuleMetadata> findAll()
findAll
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public org.springframework.data.domain.Page<ModuleMetadata> findAllByContainerId(org.springframework.data.domain.Pageable pageable, java.lang.String containerId)
findAllByContainerId
in interface ModuleMetadataRepository
pageable
- the paging metadata informationcontainerId
- the containerId of the containerModuleMetadata
of the modules.public java.util.List<ModuleMetadata> findAllByContainerId(java.lang.String containerId)
containerId
- the containerIdModuleMetadata
of the modules deployed into this container.public org.springframework.data.domain.Page<ModuleMetadata> findAllByModuleId(org.springframework.data.domain.Pageable pageable, java.lang.String moduleId)
findAllByModuleId
in interface ModuleMetadataRepository
pageable
- the paging metadata informationmoduleId
- the module id to useModuleMetadata
public java.lang.Iterable<ModuleMetadata> findAll(java.lang.Iterable<java.lang.String> ids)
findAll
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public long count()
count
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public java.lang.Iterable<ModuleMetadata> findAllInRange(java.lang.String from, boolean fromInclusive, java.lang.String to, boolean toInclusive)
RangeCapableRepository
from
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,java.lang.String>
public <S extends ModuleMetadata> S save(S entity)
save
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public void delete(java.lang.String id)
delete
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public void delete(ModuleMetadata entity)
delete
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public void delete(java.lang.Iterable<? extends ModuleMetadata> entities)
delete
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>
public void deleteAll()
deleteAll
in interface org.springframework.data.repository.CrudRepository<ModuleMetadata,java.lang.String>