public class IgniteRepositoryImpl<T,ID extends Serializable> extends Object implements IgniteRepository<T,ID>
Constructor and Description |
---|
IgniteRepositoryImpl(IgniteCache<ID,T> cache)
Repository constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
count() |
void |
delete(ID id) |
void |
delete(Iterable<? extends T> entities) |
void |
delete(T entity) |
void |
deleteAll() |
void |
deleteAll(Iterable<ID> ids)
Deletes all the entities for the provided ids.
|
boolean |
exists(ID id) |
Iterable<T> |
findAll() |
Iterable<T> |
findAll(Iterable<ID> ids) |
T |
findOne(ID id) |
<S extends T> |
save(ID key,
S entity)
Saves a given entity using provided key.
|
<S extends T> |
save(Iterable<S> entities) |
<S extends T> |
save(Map<ID,S> entities)
Saves all given keys and entities combinations.
|
<S extends T> |
save(S entity) |
public IgniteRepositoryImpl(IgniteCache<ID,T> cache)
cache
- Initialized cache instance.public <S extends T> S save(ID key, S entity)
CrudRepository.save(Object)
that generates
IDs (keys) that are not unique cluster wide.save
in interface IgniteRepository<T,ID extends Serializable>
S
- Entity type.key
- Entity's key.entity
- Entity to save.public <S extends T> Iterable<S> save(Map<ID,S> entities)
CrudRepository#save(Iterable)
that generates
IDs (keys) that are not unique cluster wide.save
in interface IgniteRepository<T,ID extends Serializable>
S
- type of entities.entities
- Map of key-entities pairs to save.public <S extends T> S save(S entity)
save
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public boolean exists(ID id)
public Iterable<T> findAll()
findAll
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public long count()
count
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public void delete(ID id)
public void delete(T entity)
delete
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public void deleteAll(Iterable<ID> ids)
deleteAll
in interface IgniteRepository<T,ID extends Serializable>
ids
- List of ids to delete.public void deleteAll()
deleteAll
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019