本文整理了Java中org.redisson.Redisson.shutdown
方法的一些代码示例,展示了Redisson.shutdown
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Redisson.shutdown
方法的具体详情如下:
包路径:org.redisson.Redisson
类名称:Redisson
方法名:shutdown
暂无
代码示例来源:origin: redisson/redisson
@Override
public void close() {
if (isClosed()) {
return;
}
synchronized (cacheManager) {
if (!isClosed()) {
if (hasOwnRedisson) {
redisson.shutdown();
}
cacheManager.closeCache(this);
for (CacheEntryListenerConfiguration<K, V> config : listeners.keySet()) {
deregisterCacheEntryListener(config);
}
closed = true;
}
}
}
代码示例来源:origin: redisson/redisson
@Override
public void close() {
if (isClosed()) {
return;
}
synchronized (cacheManager) {
if (!isClosed()) {
if (hasOwnRedisson) {
redisson.shutdown();
}
cacheManager.closeCache(this);
for (CacheEntryListenerConfiguration<K, V> config : listeners.keySet()) {
deregisterCacheEntryListener(config);
}
closed = true;
}
}
}
代码示例来源:origin: redisson/redisson
@Override
public void close() {
if (isClosed()) {
return;
}
synchronized (cacheProvider) {
if (!isClosed()) {
cacheProvider.close(uri, classLoader);
for (Cache<?, ?> cache : caches.values()) {
try {
cache.close();
} catch (Exception e) {
// skip
}
}
if (redisson != null) {
redisson.shutdown();
}
closed = true;
}
}
}
代码示例来源:origin: redisson/redisson
@Override
public void close() {
if (isClosed()) {
return;
}
synchronized (cacheProvider) {
if (!isClosed()) {
cacheProvider.close(uri, classLoader);
for (Cache<?, ?> cache : caches.values()) {
try {
cache.close();
} catch (Exception e) {
// skip
}
}
if (redisson != null) {
redisson.shutdown();
}
closed = true;
}
}
}
代码示例来源:origin: redisson/redisson
if (oldManager != null) {
if (redisson != null) {
redisson.shutdown();
代码示例来源:origin: redisson/redisson
if (oldManager != null) {
if (redisson != null) {
redisson.shutdown();
代码示例来源:origin: Atmosphere/atmosphere-extensions
public void disconnectRedisson() {
redisson.shutdown();
}
代码示例来源:origin: stackoverflow.com
Redisson redisson = Redisson.create(config);
Lock lock = redisson.getLock("anyLock");
try {
// unlock automatically after 10 seconds of hold
lock.lock(10, TimeUnit.SECONDS);
} finally {
lock.unlock();
}
...
redisson.shutdown();
代码示例来源:origin: stackoverflow.com
Redisson redisson = Redisson.create();
ConcurrentMap<String, SomeObject> map = redisson.getMap("anyMap");
...
redisson.shutdown();
代码示例来源:origin: stackoverflow.com
Redisson redisson = Redisson.create();
RQueue<SomeObject> queue = redisson.getQueue("anyQueue");
queue.add(new SomeObject());
queue.peek();
queue.pool();
...
redisson.shutdown();
代码示例来源:origin: stackoverflow.com
Config config = new Config();
config.addAddress("some.server.com:8291");
Redisson redisson = Redisson.create(config);
Lock lock = redisson.getLock("anyLock");
lock.lock();
try {
...
} finally {
lock.unlock();
}
redisson.shutdown();
代码示例来源:origin: stackoverflow.com
Redisson redisson = Redisson.create();
ConcurrentMap<String, SomeObject> map = redisson.getMap("anyMap");
map.put("123", new SomeObject());
map.putIfAbsent("323", new SomeObject());
map.remove("123");
...
redisson.shutdown();
代码示例来源:origin: stackoverflow.com
Redisson redisson = Redisson.create();
RDeque<SomeObject> queue = redisson.getDeque("anyDeque");
queue.addFirst(new SomeObject());
queue.addLast(new SomeObject());
SomeObject obj = queue.removeFirst();
SomeObject someObj = queue.removeLast();
redisson.shutdown();
代码示例来源:origin: stackoverflow.com
Config config = new Config();
// for single server
config.useSingleServer()
.setAddress("127.0.0.1:6379");
// or
// for master/slave servers
config.useSentinelConnection()
.setMasterName("mymaster")
.addSentinelAddress("127.0.0.1:26389", "127.0.0.1:26379");
Redisson redisson = Redisson.create(config);
Lock lock = redisson.getLock("anyLock");
try {
// unlock automatically after 10 seconds of hold
lock.lock(10, TimeUnit.SECONDS);
} finally {
lock.unlock();
}
...
redisson.shutdown();
代码示例来源:origin: org.redisson/redisson
@Override
public void close() {
if (isClosed()) {
return;
}
synchronized (cacheManager) {
if (!isClosed()) {
if (hasOwnRedisson) {
redisson.shutdown();
}
cacheManager.closeCache(this);
for (CacheEntryListenerConfiguration<K, V> config : listeners.keySet()) {
deregisterCacheEntryListener(config);
}
closed = true;
}
}
}
代码示例来源:origin: org.redisson/redisson
if (oldManager != null) {
if (redisson != null) {
redisson.shutdown();
代码示例来源:origin: org.redisson/redisson
@Override
public void close() {
if (isClosed()) {
return;
}
synchronized (cacheProvider) {
if (!isClosed()) {
cacheProvider.close(uri, classLoader);
for (Cache<?, ?> cache : caches.values()) {
try {
cache.close();
} catch (Exception e) {
// skip
}
}
if (redisson != null) {
redisson.shutdown();
}
closed = true;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!