V
- the cache value typeK
- the cache key type@Conditional(value=ConditionFalse.class) public class IgniteRepositoryImpl<V,K extends Serializable> extends Object implements IgniteRepository<V,K>
IgniteRepositoryFactory
Constructor and Description |
---|
IgniteRepositoryImpl(IgniteProxy ignite,
IgniteCacheProxy<K,V> cache)
Repository constructor.
|
Modifier and Type | Method and Description |
---|---|
IgniteCache<K,V> |
cache()
Returns the Ignite Cache bound to the repository
|
long |
count() |
void |
delete(V entity) |
void |
deleteAll() |
void |
deleteAll(Iterable<? extends V> entities) |
void |
deleteAllById(Iterable<? extends K> ids)
Deletes all the entities for the provided ids.
|
void |
deleteById(K id) |
boolean |
existsById(K id) |
Iterable<V> |
findAll() |
Iterable<V> |
findAllById(Iterable<K> ids) |
Optional<V> |
findById(K id) |
Ignite |
ignite()
Returns the Ignite instance bound to the repository
|
<S extends V> |
save(K key,
S entity)
Saves a given entity using provided key.
|
<S extends V> |
save(K key,
S entity,
@Nullable javax.cache.expiry.ExpiryPolicy expiryPlc)
Saves a given entity using provided key with expiry policy
It's suggested to use this method instead of default
CrudRepository.save(Object) that generates IDs
(keys) that are not unique cluster wide. |
<S extends V> |
save(Map<K,S> entities)
Saves all given keys and entities combinations.
|
<S extends V> |
save(Map<K,S> entities,
@Nullable javax.cache.expiry.ExpiryPolicy expiryPlc)
Saves all given keys and entities combinations with expiry policy
It's suggested to use this method instead of default
CrudRepository.save(Object) that generates IDs
(keys) that are not unique cluster wide. |
<S extends V> |
save(S entity)
Not implemented.
|
<S extends V> |
saveAll(Iterable<S> entities)
Not implemented.
|
public IgniteRepositoryImpl(IgniteProxy ignite, IgniteCacheProxy<K,V> cache)
ignite
- the ignitecache
- Initialized cache instance.public IgniteCache<K,V> cache()
cache
in interface IgniteRepository<V,K extends Serializable>
public Ignite ignite()
ignite
in interface IgniteRepository<V,K extends Serializable>
public <S extends V> S save(K key, S entity)
CrudRepository.save(Object)
that generates IDs
(keys) that are not unique cluster wide.save
in interface IgniteRepository<V,K extends Serializable>
S
- Entity type.key
- Entity's key.entity
- Entity to save.public <S extends V> Iterable<S> save(Map<K,S> entities)
CrudRepository.save(Object)
that generates IDs
(keys) that are not unique cluster wide.save
in interface IgniteRepository<V,K extends Serializable>
S
- Type of entities.entities
- Map of key-entities pairs to save.public <S extends V> S save(K key, S entity, @Nullable @Nullable javax.cache.expiry.ExpiryPolicy expiryPlc)
CrudRepository.save(Object)
that generates IDs
(keys) that are not unique cluster wide.save
in interface IgniteRepository<V,K extends Serializable>
S
- Entity type.key
- Entity's key.entity
- Entity to save.expiryPlc
- ExpiryPolicy to apply, if not null.public <S extends V> Iterable<S> save(Map<K,S> entities, @Nullable @Nullable javax.cache.expiry.ExpiryPolicy expiryPlc)
CrudRepository.save(Object)
that generates IDs
(keys) that are not unique cluster wide.save
in interface IgniteRepository<V,K extends Serializable>
S
- Type of entities.entities
- Map of key-entities pairs to save.expiryPlc
- ExpiryPolicy to apply, if not null.public <S extends V> S save(S entity)
save
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public <S extends V> Iterable<S> saveAll(Iterable<S> entities)
saveAll
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public Optional<V> findById(K id)
findById
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public boolean existsById(K id)
existsById
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public Iterable<V> findAll()
findAll
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public Iterable<V> findAllById(Iterable<K> ids)
findAllById
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public long count()
count
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public void deleteById(K id)
deleteById
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public void delete(V entity)
delete
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public void deleteAll(Iterable<? extends V> entities)
deleteAll
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
public void deleteAllById(Iterable<? extends K> ids)
deleteAllById
in interface IgniteRepository<V,K extends Serializable>
ids
- List of ids to delete.public void deleteAll()
deleteAll
in interface org.springframework.data.repository.CrudRepository<V,K extends Serializable>
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024