public void destroy() { LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { lockService.clearLockStore(partitionId, lockNamespace); } multiMapValues.clear(); }
public void destroy() { LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { lockService.clearLockStore(partitionId, lockNamespace); } multiMapValues.clear(); }
@Override public void init(NodeEngine nodeEngine, Properties properties) { final LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { lockService.registerLockStoreConstructor(MapService.SERVICE_NAME, new ObjectNamespaceLockStoreInfoConstructorFunction()); } mapServiceContext.initPartitionsContainers(); }
private void clearLockStore(String name) { NodeEngine nodeEngine = service.getNodeEngine(); LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { DistributedObjectNamespace namespace = new DistributedObjectNamespace(MultiMapService.SERVICE_NAME, name); lockService.clearLockStore(partitionId, namespace); } }
protected LockStore createLockStore() { NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService == null) { return null; } return lockService.createLockStore(partitionId, MapService.getObjectNamespace(name)); }
private void clearLockStore() { NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { ObjectNamespace namespace = MapService.getObjectNamespace(name); lockService.clearLockStore(partitionId, namespace); } }
private void clearLockStore(String name) { NodeEngine nodeEngine = service.getNodeEngine(); LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { DistributedObjectNamespace namespace = new DistributedObjectNamespace(MultiMapService.SERVICE_NAME, name); lockService.clearLockStore(partitionId, namespace); } }
protected LockStore createLockStore() { NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService == null) { return null; } return lockService.createLockStore(partitionId, MapService.getObjectNamespace(name)); }
private void clearLockStore() { NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { ObjectNamespace namespace = MapService.getObjectNamespace(name); lockService.clearLockStore(partitionId, namespace); } }
@Override public void init(NodeEngine nodeEngine, Properties properties) { final LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { lockService.registerLockStoreConstructor(MapService.SERVICE_NAME, new ObjectNamespaceLockStoreInfoConstructorFunction()); } mapServiceContext.initPartitionsContainers(); }
private void clearLockStore(String name) { final NodeEngine nodeEngine = mapService.getMapServiceContext().getNodeEngine(); final LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { final ObjectNamespace namespace = MapService.getObjectNamespace(name); lockService.clearLockStore(partitionId, namespace); } }
private void clearLockStore(String name) { final NodeEngine nodeEngine = mapService.getMapServiceContext().getNodeEngine(); final LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { final ObjectNamespace namespace = MapService.getObjectNamespace(name); lockService.clearLockStore(partitionId, namespace); } }
public MultiMapContainer(String name, MultiMapService service, int partitionId) { super(name, service.getNodeEngine()); this.partitionId = partitionId; this.lockNamespace = new DistributedObjectNamespace(MultiMapService.SERVICE_NAME, name); LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); this.lockStore = lockService == null ? null : lockService.createLockStore(partitionId, lockNamespace); this.creationTime = currentTimeMillis(); this.objectNamespace = new DistributedObjectNamespace(MultiMapService.SERVICE_NAME, name); }
public MultiMapContainer(String name, MultiMapService service, int partitionId) { super(name, service.getNodeEngine()); this.partitionId = partitionId; this.lockNamespace = new DistributedObjectNamespace(MultiMapService.SERVICE_NAME, name); LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); this.lockStore = lockService == null ? null : lockService.createLockStore(partitionId, lockNamespace); this.creationTime = currentTimeMillis(); this.objectNamespace = new DistributedObjectNamespace(MultiMapService.SERVICE_NAME, name); }
@Override public void init(final NodeEngine nodeEngine, Properties properties) { int partitionCount = nodeEngine.getPartitionService().getPartitionCount(); for (int partition = 0; partition < partitionCount; partition++) { partitionContainers[partition] = new MultiMapPartitionContainer(this, partition); } LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { lockService.registerLockStoreConstructor(SERVICE_NAME, new ConstructorFunction<ObjectNamespace, LockStoreInfo>() { @Override public LockStoreInfo createNew(ObjectNamespace key) { String name = key.getObjectName(); final MultiMapConfig multiMapConfig = nodeEngine.getConfig().findMultiMapConfig(name); return new LockStoreInfo() { @Override public int getBackupCount() { return multiMapConfig.getBackupCount(); } @Override public int getAsyncBackupCount() { return multiMapConfig.getAsyncBackupCount(); } }; } }); } }
@Override public void init(final NodeEngine nodeEngine, Properties properties) { int partitionCount = nodeEngine.getPartitionService().getPartitionCount(); for (int partition = 0; partition < partitionCount; partition++) { partitionContainers[partition] = new MultiMapPartitionContainer(this, partition); } LockService lockService = nodeEngine.getSharedService(LockService.SERVICE_NAME); if (lockService != null) { lockService.registerLockStoreConstructor(SERVICE_NAME, new ConstructorFunction<ObjectNamespace, LockStoreInfo>() { @Override public LockStoreInfo createNew(ObjectNamespace key) { String name = key.getObjectName(); final MultiMapConfig multiMapConfig = nodeEngine.getConfig().findMultiMapConfig(name); return new LockStoreInfo() { @Override public int getBackupCount() { return multiMapConfig.getBackupCount(); } @Override public int getAsyncBackupCount() { return multiMapConfig.getAsyncBackupCount(); } }; } }); } }