public static String getTierListenerPath(String tier) { return ZKPaths.makePath(LookupCoordinatorManager.LOOKUP_LISTEN_ANNOUNCE_KEY, tier); }
public void stop() { CloseableUtils.closeQuietly(znode); CloseableUtils.closeQuietly(instancesCache); CloseableUtils.closeQuietly(zooKeeperClient); }
public String getTail(String childPaths) { return ZKPaths.getNodeFromPath(childPaths); }
public UsageListing(Exhibitor exhibitor, String startPath, int maxChildren) { if ( startPath.trim().length() == 0 ) { startPath = "/"; } ZKPaths.PathAndNode pathAndNode = ZKPaths.getPathAndNode(startPath); this.exhibitor = exhibitor; this.startPath = ZKPaths.makePath(pathAndNode.getPath(), pathAndNode.getNode()); this.maxChildren = maxChildren; }
private static ScheduledExecutorService newExecutorService() { return ThreadUtils.newFixedThreadScheduledPool(2, "ChildReaper"); }
public PathChildrenCache make(CuratorFramework curator, String path) { return new PathChildrenCache( curator, path, cacheData, compressed, new CloseableExecutorService(exec, shutdownExecutorOnClose) ); }
ListenerResourceAnnouncer( Announcer announcer, String announceBasePath, HostAndPortWithScheme node ) { this.announcePath = ZKPaths.makePath(announceBasePath, node.toString()); this.announcer = announcer; }
@Override public void close() { CloseableUtils.closeQuietly(searcher); CloseableUtils.closeQuietly(reader); CloseableUtils.closeQuietly(directory); } }
private String defaultIndexerPath(final String subPath) { return ZKPaths.makePath(getBase(), subPath); }
@Override public void close() throws IOException { CloseableUtils.closeQuietly(writer); CloseableUtils.closeQuietly(niofsDirectory); }
public ListenerResourceAnnouncer( Announcer announcer, ListeningAnnouncerConfig listeningAnnouncerConfig, String listener_key, HostAndPortWithScheme node ) { this( announcer, ZKPaths.makePath(listeningAnnouncerConfig.getListenersPath(), listener_key), node ); }
private synchronized void closeLocalConnection() { CloseableUtils.closeQuietly(localConnection); localConnection = null; }
public String defaultPath(final String subPath) { return ZKPaths.makePath(getBase(), subPath); }
protected void unregisterInternal() { CloseableUtils.closeQuietly(znode); }
private String makeServedSegmentPath(String zNode) { return ZKPaths.makePath(liveSegmentLocation, StringUtils.format("%s%s", zNode, counter.getAndIncrement())); }
@Override public void close() throws IOException { state.set(State.CLOSED); CloseableUtils.closeQuietly(cache); }
private String makeAnnouncementPath() { return ZKPaths.makePath(config.getAnnouncementsPath(), server.getName()); } }
@Override public void stop() { CloseableUtils.closeQuietly(leaderLatch); super.stop(); }
@Override public void stop() { CloseableUtils.closeQuietly(slotZnode); super.stop(); }
@Override public void unregister() { CloseableUtils.closeQuietly(leaderLatch); unregisterInternal(); }